UVK scripting commands - ->CloseWindow()

Show menu

->CloseWindow()

Syntax:

->CloseWindow( winIndex )

Description:

Close a specific managed window.

Parameters:

winIndex (optional) - The index of the window to close. 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.
This function performs the same result as if you click the x (close) button at the right of the title bar.

Example:

;This code block will open notepad, send "My text", and close the window
<Run>
%WinDir%\notepad.exe
->WaitWindow()
->WaitControl(Edit1)
->ControlSend(Edit1,My text)
->Sleep(2, 0)
->CloseWindow()

Back to the list

 


 

Copyright Carifred © 2010 - 2024, all rights reserved.

Scroll to top