UVK scripting commands - ->WaitControlState()

Show menu

->WaitControlState()

Syntax:

->WaitControlState( ClassNN/ID , state , timeout , winIndex )

Description:

Pause script execution until a specific control has the specified state.

Parameters:

ClassNN/ID - The control's ClassNN, Advanced mode, ID or text.
state (optional) - The required state. Valid values are: Enabled, Disabled, Visible, Hidden. Default is Visible.
timeout (optional) - The timeout, in seconds. Default is 1000000.
winIndex (optional) - The index of the window the control belongs to. Default is the last ->WaitWindow() or ->WaitWindow2().

Remarks:

Optional parameters do not need to be specified.
This function must be called after at least one call to ->WaitWindow(), otherwise it will fail.

Example:

;Open notepad, wait until the text box is visible and sent two lies of text
<Run>
%WinDir%\notepad.exe
->WaitWindow()
->WaitControlState(Edit1,Visible,20,1)
->SendText(Testing Notepad Automation{ENTER}Second line)
->WaitWindowState(16)

 

Back to the list

 


 

Copyright Carifred © 2010 - 2022, all rights reserved.

Scroll to top