WINDOW |
|
| Top Previous Next | |
Syntax:
WINDOW ACTIVATE, <window>
WINDOW CLICK, <window>, <x pos>, <y pos>
WINDOW CLOSE, <window>
WINDOW FLASH, <window>, <number of flashes>, <delay between flashes>
WINDOW HIDE, <window>
WINDOW ICONIZE, <window>
WINDOW MAXIMIZE, <window>
WINDOW NORMAL, <window>
WINDOW ONTOP, <window>
WINDOW POSITION, <window>, <top>, <left>, <width>, <height>
WINDOW RCLICK, <window>
WINDOW SEND, <window>, <string>
WINDOW SETTEXT, <window>, <string>
Description:
The WINDOW command is used to control other windows. The parameter <window> should contain a window's full title bar text, its class name or the window identifier returned by a function like @WINACTIVE or @WINEXISTS, which specifies which window is the target of the command. The window is normally a main window or MDI child window.
WINDOW ACTIVATE activates (restores from an icon, or brings to the top) the specified window.
WINDOW CLICK simulates a mouse click at the point <x pos>, <y pos> relative to the top left corner of the specified window. To simulate a double click use the same command twice in succession. The command WINDOW RCLICK can be used to simulate a right-button click.
WINDOW CLOSE sends a request to close to the specified window.
WINDOW FLASH make the taskbar button and window title bar of the specified window flash.
WINDOW HIDE hides the specified window or task bar button. To un-hide the window, use WINDOW NORMAL.
WINDOW ICONIZE minimizes the specified window.
WINDOW MAXIMIZE maximizes the specified window.
WINDOW NORMAL restores to normal size the specified window.
WINDOW ONTOP sets the Topmost attribute of the specified window so that it remains in view above other windows even when not active.
WINDOW POSITION positions the specified window so that it's <top> <left> corners are at the co-ordinates specified. The <width> and <height> can also be specified, in order to resize the window. If <width> and < height> are omitted, the window retains its existing size.
WINDOW SEND sends the contents of <string> to the specified window as simulated keystrokes. Text can be entered as ordinary text. Functions like @TAB, @CR and @ESC can be used for the Tab, Enter and Escape keys. You can also use @ALT to simulate the Alt key, @CTRL for the Ctrl key and @SHIFT for the Shift key. In addition, the @KEY function can be used to generate the keystrokes for the Home, End, Up arrow, Down arrow, Left arrow, Right arrow, PgUp, PgDn, Ins and Del keys plus F1 to F12. (To send a @CHR(127) you must use two consecutive @CHR(127)'s.
Note: WINDOW SEND can only be used to send characters for which there is a key on the keyboard of the computer that is running the program. This varies from country to country. If there is not a key for a character in the string, that character is not sent. OK is set to false if one or more characters could not be sent.
WINDOW SETTEXT sends the contents of <string> to the specified window using a Windows message. Text sent to a main window using this command will replace whatever is in the title bar. To send text to a control such as an input field <window> must contain the window identifier of that actual control, which could be obtained using the @WINATPOINT function.
OK:
Set to false if <window> was not found.
Example:
if @winexists(Connected to Internet)
WINDOW position,Connected to Internet,100,100
WINDOW ontop,Connected to Internet
end
See an example of the WINDOW SEND command...
See an example of WINDOW FLASH...
See also: