UVK scripting commands - ->ControlSend()

Show menu

->ControlSend()

Syntax:

->ControlSend( ClassNN/ID , textToSend , winIndex )

Description:

Send keystrokes to a specific control in a window.

Parameters:

ClassNN/ID - The control's ClassNN, Advanced mode, ID or text.
textToSend - The keystrokes to send to the control. Can be either keyboard or mouse input.
winIndex (optional) - The index of the window the control belongs to. Default is the last ->WaitWindow() index.

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.
The text to send does NOT need to be enclosed in quotes or double quotes.

Example:

;Open notepad and send "My text" to the text box
<Run>
%WinDir%\notepad.exe
->WaitWindow()
->WaitControl(Edit1)
->ControlSend(Edit1,Line 1{ENTER}Line 2)
->WaitWindowClose()

 

Back to the list

 


 

Copyright Carifred © 2010 - 2024, all rights reserved.

Scroll to top