Core Function WinMove

From Sputnik Wiki
Jump to: navigation, search
WinMove ( <title>, <text>, <x>, <y>, <width>, <height>, <speed> )

Contents

Description

Moves and/or resizes a window.

Parameters

Title

The title of the window.

Text

Optional; The text of the window to read.

X

X coordinate to move to.

Y

Y coordinate to move to.

Width

Optional; New width of the window.

If this is equal to or lower than zero then the width will not be changed.

Height

Optional; New height of the window.

If this is equal to or lower than zero then the height will not be changed.

Speed

Optional; Speed to move the window into position 0 being instant and 1 being fast and 100 being slowest.

Default 0.

Return Value

None.

Remarks

WinMove has no effect on minimized windows, but WinMove works on hidden windows.

If very width and height are small (or negative), the window will go no smaller than 112 x 27 pixels.

If width and height are large, the window will go no larger than approximately [12+@DesktopWidth] x [12+@DesktopHeight] pixels.

Negative values are allowed for the x and y coordinates. In fact, you can move a window off screen; and if the window's program is one that remembers its last window position, the window will appear in the corner (but fully on-screen) the next time you launch the program.

If multiple windows match the criteria, the most recently active window is used.

See "WinTitleMatchMode" in Opt.

Example

Run("Notepad.exe");
Until(WinActive("Untitled -", ""))
	WinActivate("Untitled -", "");
WinMove("Untitled -", "", 0, 0, 800, 600);
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox