Window - Move

Moves a window to a specific X and Y coordinate on the screen.

You can also use this action to resize a window to a specific width and height.

Action ID:
Action Category:
Action List Syntax:

128
Window
Window.Move (<<XCORD>>, <<YCORD>>)

Settings

hWnd:

An integer value that represents the "handle" of the window (or program) on the user's desktop that you want to move or resize. The hWnd value can be determined using a "Window - Find" action, or the built-in variable %MenuHWnd% (which is the hWnd value for the AutoPlay application's window) can be used.

X coordinate:

Enable

Enables the X Coordinate setting.

Select this option if you want to change the horizontal position of the window.

Value:

The new X coordinate for the top left corner of the window. This will be the distance in pixels from the left edge of the user's screen to the left edge of the window.

Y coordinate:

Enable

Enables the Y Coordinate setting.

Select this option if you want to change the vertical position of the window.

Value:

The new Y coordinate for the top left corner of the window. This will be the distance in pixels from the top of the user's screen to the top of the window.

Height:

Enable

Enables the Height setting.

Select this option if you want to change the height of the window.

Value:

The new height for the window, in pixels.

Width:

Enable

Enables the Width setting.

Select this option if you want to change the width of the window.

Value:

The new width for the window, in pixels.

Error Codes

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

MSG_ERR_WINDOW_MOVE

MSG_ERR_WINDOW_MOVE
MSG_ERR_WINDOW_NO_MATCHING_PARAMS
hWnd: <<HWND>>

2

MSG_ERR_WINDOW_MOVE

MSG_ERR_WINDOW_MOVE
MSG_ERR_WINDOW_COULD_NOT_MOVE
hWnd: <<HWND>>

Examples

Moving a window

Moving a window (advanced)