Mouse move

Syntax1 - absolute movement

mou [x y] [window] [flags]

 

Syntax2 - relative movement

mou(+|-) x y

 

Syntax3 - relative movements, used for compact recording

mou "recorded unreadable text"

 

Syntax4 - restore mouse position

mou

 

Parameters

x y - mouse pointer coordinates.

window - top-level or child window. If omitted, coordinates are relative to the top-left corner of the screen.

flags: 1 - coordinates are relative to the top-left corner of window's client area. If window is literal 0, the work area. Default: 0.

 

Options:

+ coordinates are relative to the mouse pointer position.
- coordinates are relative to the previous mouse movement/click command coordinates.

 

Remarks

Syntax4: Restores cursor position as it was before first mouse movement/click command in current macro.

 

The speed depends on spe and opt slowmouse.

 

Examples

mou 500 300 ;;move the mouse pointer to 500, 300 pixels of the screen
mou 100 150 "Notepad" ;;move the mouse pointer to 100, 150 pixels of "Notepad" window
mou+ 20 -10 ;;move the mouse pointer 20, -10 pixels from current position
mou ;;restore mouse pointer position as it was before first mouse movement/click command in current macro

 Move the mouse pointer  in "Notepad" window, x=100 (relative to "Notepad"), don't change y:
int w = win("Notepad")
mou 100 ym(0 w) w

 Get mouse pointer position, ..., restore mouse pointer position:
int px(xm) py(ym)
...
mou px py