WinPlaceSet

Sets window coordinates.

Syntax:

WinPlaceSet (win-type, partial-winname, position-string)

Parameters:

(i) win-type  @ICON, @NORMAL, or @ZOOMED

(s) partial-winname the initial part of, or an entire, window name.

(s) position-string window coordinates (see below).

Returns:

(s)  previous coordinates.

 

This function sets the coordinates for an iconized, normal, or zoomed window. The window does not have to be in the desired state to set the coordinates; for example, you can set the iconized position for a normal window so that when the window is subsequently iconized, it will go to the coordinates that you've set.

"Partial-winname" is the initial part of a window name, and may be a complete window name. It is case-sensitive. You should specify enough characters so that "partial-winname" matches only one existing window. If it matches more than one window, the most recently accessed window which it matches will be used.

"Position-string" is a string of either 2 or 4 numbers, as follows:

Iconic windows "x y" (upper left corner of the icon)
Normal windows "upper-x upper-y lower-x lower-y"
Zoomed windows "x y" (upper left corner of the window)

 

All coordinates are relative to a virtual 1000x1000 screen.

This function works only with top-level (parent) application windows.

Note: 1000x1000 virtual screen size is based on the primary monitor in a multi-monitor display configuration

Examples:
 
Run("Notepad.exe","") WinPlaceSet(@ICON, "~Notepad", "10 950")

 

See Also:

WinActivate, WinArrange, WinPlace, WinPlaceGet, WinState, Partial Window Names, IntControl 46