Commands & Syntax > Commands > Window Manipulation >

www.perfectkeyboard.com

 

MOVE - < winmove >() ... [Pro]

 

Window MOVE
<winmove>("Window",Match,x,y)
Available in: Professional edition

The command moves specified window to defined position.

 

#

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 moved.

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

3

x

X-coordinate of desired window position

4

y

Y-coordinate of desired window position

 

Example (Macro Steps):

 

1

<#> <#> This macro moves "Notepad" window to position (32,32)

2

Macro execution: ONLY COMMANDS

3

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

4

Window MOVE "[*Notepad|Notepad|#0|#0]" to [ x=32, y=32 ]

5

ELSE activate

6

Message SHOW "" : "'Notepad' is not opened!" (other parameters: x = 100, y = 100, Window title = Message, Buttons = OK, Timeout (seconds) = , Always on top = ).

7

ENDIF

Example (Plain Text):

 

<#> This macro moves "Notepad" window to position (32,32)

<#>

<cmds>

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

   <winmove>("[*Notepad|Notepad|#0|#0]",0,32,32)

<else>

   <msg>(100,100,"'Notepad' is not opened!","Message",1)

<endif>