UVK scripting commands - ->WinSend()

Show menu

->WinSend()

Syntax:

->WinSend( textToSend , winIndex )

Description:

Send keystrokes to a window.

Parameters:

textToSend - The keystrokes to send to the window. Can be either keyboard or mouse input.
winIndex (optional) - The index of the window. 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.

This function is similar to ->ControlSend, except the keystrokes are sent to the application's main window instead of a child control.
Useful to send keystrokes to console applications that don't have any controls.

Example:

;Open the command prompt and start system file checker scan
<Run>
%SystemDir%\cmd.exe /k
->WaitWindow()
->Sleep(1000)
->WinSend(sfc.exe /scannow{Enter})
->WaitWindowClose()

 

Back to the list

 


 

Copyright Carifred © 2010 - 2024, all rights reserved.

Scroll to top