Window Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations >

Window Operations

SAW. - Set Active Window

Previous Top Next


MiniRobotLanguage (MRL)

 

SAW. Command

Set Active Window

 

 

Intention

 

The SAW.-Command will give an edit control the input-focus. As a result you may see a blinking cursor inside.

 

graphic

 

The input focus can only be in one window/control at the same time.

If you type something on the Keyboard, the control with the input focus will reveive the typing. The same happens, if you simulate typing using SKP. Send-Key-Press  and such commands. That's why SAW. can be used before you type into a textbox.

 

When using the Direct Engine (commands for example: RST. and SDT.) the input-focus is not needed and therefore SAW. is not needed.

 

In most cases you will not give a parameter to SAW., but just locate the child window before using ! SCW - Search-Child-Window .

 

You can however add a variable with a window handle from a child-window.

The the robot tries to give the input-focus to that child-window.

 

SAW. will also try to bring the window to front, if it is behind other windows.

Usage is simple. Just write:

 

STW.Act|PBWindowClass:0|TestApp

SCW.cn|edit|2

SAW.

 

 

 

 

Syntax

 

SAW.[P1]

 

 

Parameter Explanation

 

P1 - (optional) VAR or formula in (..).

     Must be a valid Window handle

 

 

 

 

 

Example

 

STW.AgXctw|over|PBWindowClass:0|TestApp|0

EXE.?exepath\Sample Apps\TestApp_01.exe

:over

'Move pointer to Window-Area.

STW.Act|PBWindowClass:0|TestApp

SCW.cn|edit|2

SAW.

ENR.

 

 

 

Remarks

 

To move a Application window (Top-window) to front, use SFW. - Set Foreground WIndow. or ! STW. -Search Top-Window.

 

 

Limitations:

 

-

 

 

See also:

 

    SFW. - Set Foreground WIndow

    SWS. - Set Window State

    ! STW. -Search Top-Window

    ! SCW - Search-Child-Window

    WII. - Wait-for-Input-Idle

    SKP. Send-Key-Press

    SKT. - Send-Key-Text