Back

Command Mouse
Parameters the X and Y coordinates to move the mouse to together with S if the coordinates are relative to the screen and W if they are relative to the active window.

Commands Click, LeftClick
Parameters None

To create a Mouse command, Type Mouse then, type Ctrl + M or select Capture Mouse Position from the Edit menu. Spartan will minimize leaving this dialog on screen....

Choose whether you want coordinates relative to the screen or the active window. Position the mouse and press Esc. Spartan will reappear with the coordinates on the Windows clipboard ready to paste into your script.

Example: This opens Notepad and clicks Open on the File menu.

[[Script]]
open "%windir%\system32\notepad.exe"
Mouse 23,41 W
Click
Mouse 69,81 W
Click

Note:

You should exercise care when using Mouse and Click commands on different monitors. Most windows resize automatically when moved between monitors but some do not. Additionally, a drop down menu of 20 or 30 choices may show 20 or 30 choices on your 28 inch monitor, but it will show a smaller number and scroll on your 8 inch net book.

Back