UVK scripting commands - ->ClickWindowPos()

Show menu

->ClickWindowPos()

Syntax:

->ClickWindowPos( xPos , yPos , winIndex , Button , Clicks )

Description:

Simmulate a mouse click at the specified position within a window.

Parameters:

xPos - The horizontal position to click, in client area coordinates.
yPos - The vertical position to click, in client area coordinates.
winIndex (optional) - The index of the window the control belongs to. Default is the last ->WaitWindow() window.
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.

Example:

;Open notepad, wait half a second and right-click at 100x100
<Run>
%WinDir%\notepad.exe
->WaitWindow()
->Sleep(500)
->ClickWindowPos(100, 100, 1, menu)
->WaitWindowState(16)

 

Back to the list

 


 

Copyright Carifred © 2010 - 2024, all rights reserved.

Scroll to top