Move Method (MoveableWin)

Class

MoveableWin.

Action

Moves the window.

Syntax

window.Move (iXpos, iYpos)
Variable Description
iXpos The new horizontal position of the top-left corner of the window. INTEGER.
iYpos The new vertical position of the top-left corner of the window. INTEGER.

Notes

The Move method moves the window so that its top-left corner is at location (iXpos, iYpos). After moving the window, Silk Test Classic verifies that it moved to the correct location, and raises the exception E_CANT_MOVE_WINDOW if it is not.

Set the OPT_WINDOW_MOVE_TOLERANCE option to specify the number of pixels allowed for a tolerance when a moved window does not end up at the specified position.

For some windows and GUIs, you can’t always move the window to the particular pixel specified. If the ending position is not exactly what was specified and the difference between the expected and actual positions is greater than the tolerance, Silk Test Classic raises an exception.

Example

RECT myRect
myRect = TextEditor.GetRect ()
// moves the window 8 pixels right and 8 pixels down
TextEditor.Move (myRect.xPos + 8, myRect.yPos + 8)