JMacro Readme

JMacro can be used to automate many tasks. It was designed to be used in conjunction with applications which require a lot of repetitious input (mainly games).

The macro syntax is described below. The delimiter between commands is any type of whitespace (spaces, tabs, newlines). All durations are entered in milliseconds. All commands are case sensitive. The syntax supports comments in the form of //comment and /*comment*/

Settings

All settings can be overridden within the macro script as detailed in the Commands section below

Loop
    Check this option if the macro script should never stop executing
Event Delay
    The default pause, in milliseconds, between each command
Initial Start Delay
    The amount of time to pause between pressing the Start button and starting the macro

Commands

Input Commands

command
command ( duration )
    Hold input down for duration milliseconds
command ( duration , continue )
    Hold input down for duration milliseconds and proceed with script without waiting for this command to complete

Looping Commands

loop ( count , command(s) )
    Loop the specified command(s) count times
timedLoop ( duration , command(s) )
    Loop over the specified command(s) until duration milliseconds has passed. The last looped iteration may exceed the duration

Pause Command

pause ( duration )
    Pause for duration milliseconds. A pause command will override any default pause between events

Mouse Move Command

mouse( x , y )
    Move the mouse to the specified coordinates. To measure coordinate location, the current mouse coordinates are always displayed in the lower-right corner of the JMacro window

Setting Overrides

//override_loop (true|false)
//override_event_delay milliseconds
//override_initial_delay milliseconds

Examples

Press the left mouse button, then press W for ten seconds

mouseLeft
W(10000)

While holding down shift and the W key, click the left mouse button repeatedly for twenty seconds

shift(20000, continue)
W(20000, continue)
timedLoop(20000, mouseLeft)