Home > Language Reference > Windows Management Functions > SizeWindow

SizeWindow

The SizeWindow function resizes the specified window.

Syntax

ret=SizeWindow(<window_name>, <width>,<height>)

Parameters

<window_name>, string, window name including its instance number of the window to resize. You can truncate <window_name> to maximize a window whose title starts with the specified characters.

<width>, integer, new width in pixels for the resized window.

<height>, integer, new height in pixels for the resized window.

Return value

ret, optional numeric return value. If the window has been successfully resized within 30 seconds (this default value can be changed using #ActionTimeout), the function returns 0. If the function fails, the return value is a nonzero value (see Window Functions Error Codes).

See also

MaximizeWindow
MinimizeWindow
MoveWindow
RestoreWindow

Example

Shell("notepad")
SizeWindow("NOTEPAD.EXE|Notepad|Untitled",1, 200,300)