Method ControlMove

AutoIt X

Method Reference


ControlMove

Moves a control within a window

ControlMove "title", "text", "controlID", x, y [, width [, height]]

Parameters

title The title of the window to move.
text The text of the window to move.
controlID The control to interact with. See Controls.
x X coordinate to move to.
y Y coordinate to move to.
width Optional: New width of the window.
height Optional: New height of the window.

Return Value

Success: Returns 1.
Failure: Returns 0 if window/control is not found.

Remarks

When using a control name in the Control functions, you need to add a number to the end of the name to indicate which control. For example, if there two controls listed called "MDIClient", you would refer to these as "MDIClient1" and "MDIClient2".

Related

ControlCommand, WinMove

Example


Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
oAutoIt.ControlMove "Untitled -", "", "MDIClient1", 0, 0, 200, 200