<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > STW. - Search Top Window > Window Operations * STW. |
MiniRobotLanguage (MRL)
"a" - Flag "all windows"
Search Top Window
Intention
In most cases, we want to act on visible and enabled window only.
Therefore the STW. command ignores by default windows, if they are disabled or invisible.
The "a" flag changes this behavior. Using the "a"-Flag, the STW. command will locate "all windows". This includes Top-Window which are invisible or disabled, or both.
Using the Flag "a" ALL Top windows will be found if they meet the search criteria.
Example
'MR Script-file:
'Version:
'Purpose: STW.-Features Demo
'Author: Theo Gottwald
'Creation date: 09.12.11
'===========================================================
'#EXE:?pfad\
'#SPI:ForceWrite
'
' Start an Application only, if that Application is not yet running.
'
STW.wtUX|0|BCS - Testform|found
EXE.?exepfad\Sample Apps\BSC-Testform.exe
:found
' Next we make the thing invisible
SWS.i
' Wait a second
PAU.1
' Locate it using "all"
STW.wt|0|BCS - Testform
' Locate the Button using "all"
SCW.anctb|1|Button|Next|0
' CLick the button, while its invisible
MLE.
' Get the Top-Handle
GCT.
' Make it visible again
SWS.v
ENR.
Remarks
If you definitely know that the window is invisible, you can use the "u" - Flag - STW. which will only search for invisible windows and ignore visible windows.
The same applies for disabled windows, and the "f" - Flag - STW.
Limitations:
See also: