Window Operations * STW.

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations > STW. - Search Top Window >

Window Operations * STW.

"w" - Flag "wait time"

Previous Top Next


MiniRobotLanguage (MRL)

 

"w" - Flag "wait time"

Search Top Window

 

 

Intention

 

How long do we wait if a window will appear or not?

Let's try it.

 

: $$TIM=#dtime#

STW.tX|nix

: $$TIM=#dsince#

MBX.$$TIM

ENR.

 

This i what we get.

 

graphic

 

It's currently about 15 seconds. When you read this it can be another value.

In fact this is the default time that we wait for a window before we run into an error-message or do something else (like in this script).

 

Now, its very important to understand that we do not generally wait 15 seconds, and then look if the window has appeared.

What we do is, we try ... try ... and try and check permanently, if the window has appeared. If the window appears any time, the script will immediately continue.

 

If the time is over, we do something else.

 

Now 15 seconds is enough for some cases, in many cases the window will appear after 45 seconds or any other time. Now this is where the "w"-flag enters the game.

 

Using the  "w"-flag we can tell the robot how long he should wait. It can be 0 seconds like this:

 

STW.wtUX|0|BCS - Testform|found

EXE.?exepfad\Sample Apps\BSC-Testform.exe

:found

 

or 360 seconds like here.

 

STW.wtu|360|BCS - Testform

 

and there is no real limitation.

 

 

Example

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

The maximum number for the waiting time is the equivalent for 23100 days. In short: you can not ask the robot to wait longer for a window then ~63 years.

Anything below will be just fine. Note that negative waiting times will be rounded to zero.

 

 

See also: