Commands & Syntax > Commands > Mouse Commands >

www.perfectkeyboard.com

 

COORDINATES - < mousemove_relative_definedwindow >() ... [Free]

 

Mouse COORDINATES
<mousemove_relative_definedwindow>("Window",Match)
Available in: Free edition

This command changes "mouse move" command behavior so that "mouse move" coordinates are relative to upper-left corner of the selected window.

 

#

Parameter name

Parameter description

1

Window

Window identifier in form of Window Identification Path (WIP) or HWND. It identifies the window that is to be closed.

2

Match

Takes effect only if a window is identified using WIP parameter. Can be one of these values:
0 - match substrings in WIP
1 - match exact strings in WIP

 

Example (Macro Steps):

 

1

<#> <#>This example moves mouse cursor to upper-left corner of Notepad window

2

Macro execution: ONLY COMMANDS

3

IF WINDOW "[* - Notepad|Notepad|#0|#114]" Is Open (Match=Partial)

4

Mouse COORDINATES are now RELATIVE to WINDOW "[* - Notepad|Notepad|#0|#114]" (Match = Partial)

5

Mouse MOVE position [ x=10, y=10 ]

6

ENDIF

Example (Plain Text):

 

<#>This example moves mouse cursor to upper-left corner of Notepad window

<cmds>

<if_win>("[* - Notepad|Notepad|#0|#114]","OPEN",0)

   <mousemove_relative_definedwindow>("[* - Notepad|Notepad|#0|#114]",0)

   <mm>(10,10)

<endif>