Wait Busy Window

Verb: waitBusy

Wait for a window, for a period of time, and check if it is busy or not.

Syntax

waitBusy [--window(Window)] [--sleepbefore(TimeSpan)] [--sleepafter(TimeSpan)] [--ignoreerror(Boolean)] [--timeout(TimeSpan)] (Boolean)=value

Inputs

Script Designer Required AcceptedTypes Description
--window Window Optional Window Window that should be expected.
--sleepbefore Sleep Before Optional Time Span Wait time before checking if the window is occupied.
--sleepafter Sleep After Optional Time Span Wait time after checking if the window is occupied.
--ignoreerror Ignore Error Optional Boolean Prevents the error message from being displayed if the window is still busy.
--timeout Timeout Optional Time Span, Number, Text Command execution timeout.
If no value is defined in the parameter of type timeout, the execution uses the time defined by the Set Timeout command. If the script does not use this command, the default time is 5 seconds.
The value entered in this parameter must be greater than the sum of the values entered in the Sleep After and Sleep Before parameters. If the time value entered is not sufficient for the command to determine whether the window is occupied or not, a timeout message will be returned.

Outputs

Script Designer AcceptedTypes Description
value Busy Boolean Returns "True" if the window is busy, or "False" if it is not.

Example

The command assigns the window to the variable "paintWindow" and waits 5 seconds to check whether it is busy, with a 5 second retry check, and a maximum timeout of 30 seconds for complete execution. Returns, in the variable "busyWindow", "False" for busy window, or "True" for busy window.

defVar --name busyWindow --type Boolean
defVar --name paintWindow --type Window
launchWindow --executablepath "C:\\Windows\\system32\\mspaint.exe" paintWindow=value
// Check if the open window is busy.
waitBusy --window ${paintWindow} --sleepbefore 00:00:05 --sleepafter 00:00:05 --timeout 00:00:30 busyWindow=value
logMessage --message "Paint Window is Busy: ${busyWindow}" --type "Info"
closeWindow --window ${paintWindow}
// The return varies according to the current execution context. In the case of this example: False.

See Also

  • Attach Window
  • Cancel Token Source
  • Clear Cache
  • Click
  • Click on Cell
  • Click on Menu
  • Click on Value
  • Close Window
  • Control Screenshot
  • Count Windows
  • Expand Tree
  • Find Window
  • Find Windows
  • Focus
  • Focus Window
  • Get Barcode
  • Get Bounds
  • Get Cell Value
  • Get Control
  • Get Image Grid
  • Get Interval
  • Get Options
  • Get Table
  • Get Table Information
  • Get Tree Nodes
  • Get Value
  • Handle Open File Dialog
  • Handle Save File Dialog
  • Launch and Attach Window
  • Launch or Attach Window
  • Map Image Grid
  • Maximize or Minimize Window
  • Offset Value
  • Screenshot Window
  • Select Row
  • Select Tab
  • Set Execution Throttling
  • Set Grid Value
  • Set Value
  • Show or Hide Element
  • Update Window
  • Verify Enabled
  • Verify If Visible
  • Wait and Close Security Window
  • Wait Control
  • Wait for Control to Enable
  • Wait for Window to Appear
  • Watch and Close Window