Window Operations * WTW.

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations > WTW. - Wait new Top Window >

Window Operations * WTW.

"j" - Flag "WII. by number"

Previous Top Next


MiniRobotLanguage (MRL)

 

"j" - Flag "WII. by number"

Wait for Input Idle and tell how long

 

 

Intention

 

"Wait for Input Idle" halts script execution until the localized window is ready to process our Input.

 

This Command can be seen as a dynamic Pause-Statement, it waits only if our target window is busy. The maximum waiting time must be given as a numeric value or variable.

 

Note the value you specify will replace the default internal value for "WII. without parameter", used for the "k" - Flag - STW. . But also for WII. if no parameters are given.

 

Unlike a fixed pause statement which would always wait for a fixed time. WII. is the better solution.

 

If the process is a console application or does not have a message queue, "Wait For Input Idle" returns immediately.

 

The given time is in seconds. Fractions are allowed. For example:

 

' WIll wait no longer then a half second

STW.cj|WindowClass|0.5

MMV.

 

Technically the "j"-Flag does the same like the WII. - Wait-for-Input-Idle statement. Just that it is integrated and does not need a separate line of code.

 

 

 

Example

 

' j - wait 5 Seconds maximum

STW.cj|WindowClass|5

MMV.

 

 

 

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:

 

    WII. - Wait-for-Input-Idle

    "k" - Flag - STW.