UVK scripting commands - ->ClickControl() |
Syntax:
->ClickControl( ClassNN/ID , winIndex , Button , Clicks )
Description:
Click a specific control in a window.
Parameters:
ClassNN/ID - The control's
ClassNN, Advanced mode, ID or text.
winIndex
(optional) - The index of the window
the control belongs to. Default is the last ->WaitWindow() index.
Button (optional) - The mouse button to click: left,
right, middle, main, primary, menu,
secondary. Default is main.
Clicks
(optional) - The number of times to click the mouse. Default is 1.
Use 2 to perform a double click.
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.
main and
primary are always the main button, even if the mouse buttons
have been swapped in the control panel.
menu or
secondary are always the secondary mouse button, even if the
mouse buttons have been swapped in the control panel.
left and right
are those buttons by default. However, if the mouse buttons have
been swapped in the control panel left will be the righ
button, and right will be the left button.
Example:
;Open notepad and right-click the text
box
<Run>
%WinDir%\notepad.exe
->WaitWindow()
->WaitControl(Edit1)
->ClickControl(Edit1,-1,menu,1)
->WaitWindowState(16)
Back to the list