CloseWindow
Windows management function.
The CloseWindow function closes the specified window.
Usage
Generally used to close an application or a dialog box. KillApp function is better to use if a Save dialog box is displayed when ending the application, and you do not want to save.
Syntax
CloseWindow(<window_name>[[,<instance>],forced])
or
ret=CloseWindow(<window_name>[[,<instance>],forced])Parameters
<window_name>, window name of the window to close.
<instance>,optional parameter, instance number of the window to close.
forced, optional keyword. If used, if the window cannot be closed due to a still opened dialog box, the close is forced after 30 seconds.
Return value
Ret, numeric return code. When successful, the function returns 0, otherwise use this return code for Error Handling.
Examples
CloseWindow("NOTEPAD.EXE|Notepad|Untitled")
CloseWindow("NOTEPAD.EXE|Notepad|Untitled",1)
CloseWindow("NOTEPAD.EXE|Notepad|Untitled",1,forced)