Close
Showing results 1 to 10 of 23

Hybrid View

  1. #1

    Default

    Quote Originally Posted by thinus View Post
    I am just curious as to where you are going with this...? I've been talking to a friend of mine about what we would like in a complete solution for multi-boxing and how we would design it. We are thinking along the lines of an I/O module dealing with keyboard and mouse hooking, application management and network communication.
    Mojo aleady does many things on your list and it will do all of them (and much more) in the near future.

    Mojo consists of two parts, an engine and an application. The engine presents an API to the application. The API is defined in a file called mojo_engine.h in the source code.

    For more information about the program's architecture, see

    Overview for Programmers

    Any plans to link in a scripting language like LUA, Python, JScript? The scripts can be linked to the I/O events in the I/O module.
    Eventually, after Mojo has a powerful graphical interface, Mojo will have a script language but it will probably be the language from HotkeyNet 2 which is described here:

    http://www.hotkeynet.com/hkn2/ref/LanguageOverview.html

    http://www.hotkeynet.com/hkn2/ref/ref_index.html

    The reason I wrote a language from scratch is that the language for this program needs some peculiar things that don't exist (so far as I know) in any drop-in script language:

    -- distributed processing

    -- hotkey definitions

    -- key lists
    Last edited by Freddie : 11-27-2009 at 06:34 AM
    �Author of HotkeyNet and Mojo

  2. #2

    Default

    Quote Originally Posted by Freddie View Post
    Mojo aleady does many things on your list and it will do all of them (and much more) in the near future.

    Mojo consists of two parts, an engine and an application. The engine presents an API to the application. The API is defined in a file called mojo_engine.h in the source code.

    For more information about the program's architecture, see

    Overview for Programmers
    I'll take a look at the source sometime soon. Sounds really good and the overview was quite informative.

    Eventually, after Mojo has a powerful graphical interface, Mojo will have a script language but it will probably be the language from HotkeyNet 2 which is described here:

    http://www.hotkeynet.com/hkn2/ref/LanguageOverview.html

    http://www.hotkeynet.com/hkn2/ref/ref_index.html

    The reason I wrote a language from scratch is that the language for this program needs some peculiar things that don't exist (so far as I know) in any drop-in script language:

    -- distributed processing

    -- hotkey definitions

    -- key lists
    I've used HKN before and I turned a friend onto HKN for LOTRO. We both found that the scripting language was a beast to work with as soon as you tried doing something out of the box.

    Wouldn't it be much easier to just plug in an established scripting language and extend it by providing the required application specific functionality?
    The Orcks of War
    Shaman Borck Zorck Dorck Porck Corck
    Mixed Team - Msblonde - Mswhite - Msblack - Msred - Msbrown -

  3. #3

    Default

    Quote Originally Posted by thinus View Post
    I've used HKN before and I turned a friend onto HKN for LOTRO. We both found that the scripting language was a beast to work with as soon as you tried doing something out of the box.

    Wouldn't it be much easier to just plug in an established scripting language and extend it by providing the required application specific functionality?
    I'm talking about HotkeyNet 2's language, not HotkeyNet 1. HotkeyNet 2 has a real language. Here's an overview:

    http://hotkeynet.com/hkn2/ref/LanguageOverview.html

    One of the main reasons why I wrote a language from scratch instead of, e.g., adapting Lua was the following paragraph from the page I just linked:

    Distributed processing is built into the language. You can put almost any statements inside a "sendto" block, and the local copy of HotkeyNet will send that code (in compiled form) to a remote copy of HotkeyNet where it will execute.
    To make the language do that, every internal piece of the language had to be designed for it. The data structures that represent variables, the binding method for functions, the syntax of the language, the way strings of byte code are fed into the interpreter ... everything had to be designed for it. Maybe it would be practical for some people to retrofit that into a complicated program written by other people, but for me, it was easier to start with a clean sheet of paper.
    �Author of HotkeyNet and Mojo

  4. #4

    Default

    Quote Originally Posted by Freddie View Post
    I'm talking about HotkeyNet 2's language, not HotkeyNet 1. HotkeyNet 2 has a real language. Here's an overview:

    http://hotkeynet.com/hkn2/ref/LanguageOverview.html

    One of the main reasons why I wrote a language from scratch instead of, e.g., adapting Lua was the following paragraph from the page I just linked:

    Distributed processing is built into the language. You can put almost any statements inside a "sendto" block, and the local copy of HotkeyNet will send that code (in compiled form) to a remote copy of HotkeyNet where it will execute.
    To make the language do that, every internal piece of the language had to be designed for it. The data structures that represent variables, the binding method for functions, the syntax of the language, the way strings of byte code are fed into the interpreter ... everything had to be designed for it. Maybe it would be practical for some people to retrofit that into a complicated program written by other people, but for me, it was easier to start with a clean sheet of paper.
    How will this be used and what is the benefit? I am struggling to wrap my head around it. I would have thought that each instance of the software will take keyboard and mouse input, process the input and send keyboard and mouse messages onto the registered applications.

    The networking aspect would simply receive keyboard and mouse input from a network connection as well as from Windows keyboard and mouse hooks. Why is it necessary to send pre-compiled scripts across the network?
    The Orcks of War
    Shaman Borck Zorck Dorck Porck Corck
    Mixed Team - Msblonde - Mswhite - Msblack - Msred - Msbrown -

  5. #5

    Default

    Quote Originally Posted by thinus View Post
    How will this be used and what is the benefit? I am struggling to wrap my head around it. I would have thought that each instance of the software will take keyboard and mouse input, process the input and send keyboard and mouse messages onto the registered applications.

    The networking aspect would simply receive keyboard and mouse input from a network connection as well as from Windows keyboard and mouse hooks. Why is it necessary to send pre-compiled scripts across the network?
    I have two machines, one for my master and a second for my four slaves.

    In HKN1, I have a script on my master machine that is not on my slave machine. The script on the main machine has a section that launches WoW, resizes, enters username and password, etc. HKN1 sends this part of the script accross to the second machine and runs it.

    By changing the one script on the main machine, I can control what happens on the second.

    Without "pre-compiled scripts" this would not be possible.
    Jafula.
    Jamba - Jafula's Awesome Multi Boxer Assistant. An addon for YOU.

  6. #6

    Default

    Quote Originally Posted by Freddie View Post
    I'm talking about HotkeyNet 2's language, not HotkeyNet 1. HotkeyNet 2 has a real language. Here's an overview:

    http://hotkeynet.com/hkn2/ref/LanguageOverview.html

    One of the main reasons why I wrote a language from scratch instead of, e.g., adapting Lua was the following paragraph from the page I just linked:


    To make the language do that, every internal piece of the language had to be designed for it. The data structures that represent variables, the binding method for functions, the syntax of the language, the way strings of byte code are fed into the interpreter ... everything had to be designed for it. Maybe it would be practical for some people to retrofit that into a complicated program written by other people, but for me, it was easier to start with a clean sheet of paper.
    Quote Originally Posted by Jafula View Post
    I have two machines, one for my master and a second for my four slaves.

    In HKN1, I have a script on my master machine that is not on my slave machine. The script on the main machine has a section that launches WoW, resizes, enters username and password, etc. HKN1 sends this part of the script accross to the second machine and runs it.

    By changing the one script on the main machine, I can control what happens on the second.

    Without "pre-compiled scripts" this would not be possible.
    Why not just push the text script to the 2nd machine and pre-compile it on the 2nd machine instead of sending compiled code over the network?
    The Orcks of War
    Shaman Borck Zorck Dorck Porck Corck
    Mixed Team - Msblonde - Mswhite - Msblack - Msred - Msbrown -

  7. #7

    Default

    Quote Originally Posted by thinus View Post
    Why not just push the text script to the 2nd machine and pre-compile it on the 2nd machine instead of sending compiled code over the network?
    Meh. No idea. Maybe it does that, I could be wrong in my assumptions. Freddie might be able to answer that one.
    Jafula.
    Jamba - Jafula's Awesome Multi Boxer Assistant. An addon for YOU.

  8. #8

    Default

    Quote Originally Posted by thinus View Post
    How will this be used and what is the benefit? I am struggling to wrap my head around it. I would have thought that each instance of the software will take keyboard and mouse input, process the input and send keyboard and mouse messages onto the registered applications.

    The networking aspect would simply receive keyboard and mouse input from a network connection as well as from Windows keyboard and mouse hooks. Why is it necessary to send pre-compiled scripts across the network?
    I'll try to illustrate one of the main issues with an example using HKN2 syntax.

    Code:
    function MyFunction ( MyVar  )
    {
       sendto ( 192.168.1.102 )
       {
          MyVar = MyVar + " all folks.";
          Print ( MyVar );
       }
    }
    The function executes on the local machine. The instructions in the compound block (inner curly braces) execute on the remote machine. How does the value of MyVar (which only exists in a stack on the local machine, it's not in a script on either machine) get to the remote machine and bind into the code there?

    Seems to me that regardless of how this is implemented, the remote machine has to receive the following information in some form. The form doesn't matter -- it can be source code or compiled code -- but the remote has to receive the following info. (I'm making up a value for the variable. In real life the value would be whatever is in the local stack at runtime.)

    Code:
    var MachineGeneratedVar = "That's";
     
    function MachineGeneratedFunction  (  MyVar = MachineGeneratedVar )
    {
          MyVar = MyVar + " all folks.";
          Print ( MyVar );
    }
    I think it's useful to think of the problem in terms of the above transformation. The transformation is a sort of functional spec for what the program has to do in some way or other.

    Quote Originally Posted by thinus
    Why not just push the text script to the 2nd machine and pre-compile it on the 2nd machine instead of sending compiled code over the network?
    I'm going to skip over the "pre compile" part of your suggestion because it's not the main point, and also because Mojo has to assume that the local PC loaded the script hours ago and only just connected to the remote PC a millisecond ago. I'll just focus on the comparison of text vs. byte code.

    The main point is whether Mojo could "just push the text script." Well, it can't simply push the original text script because the fragment of the original script looks like this:

    MyVar = MyVar + " all folks.";
    Print ( MyVar );
    That's just a fragment. It won't compile or run on its own because, for one thing, MyVar isn't initialized. The fragment has to be expanded and transformed in some way before the remote compiles it. It has to be turned into the second example above, or something equivalent.

    So we're not really comparing "push as written" to "do extra work." We're comparing two kinds of extra work.

    If the program sends text (e.g. the second example above) to the remote, the local copy of Mojo must:

    1. At compile time, create machine-generated functions in source form, store them somewhere, etc.

    2. At compile time, put instructions in the compiled code that tell the interpreter to fetch the appropriate machine-generated-function-in-source-form and do the rest of the things on this list.

    3. At run time, look up the value of MyVar in the stack.

    4. At run time, create a new piece of source code that defines MyVar as a global variable and initializes it with a literal which has the same value as the value of the run-time variable in the local stack.

    5. At run time, combine the two pieces of source code (variable definition and machine-generated function) and send them to the remote.
    Last edited by Freddie : 11-30-2009 at 12:27 PM
    �Author of HotkeyNet and Mojo

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •