Method
(number) How to close the window. Choose from:
CONSTANT |
VALUE DESCRIPTION |
|
CLOSEWND_SENDMESSAGE |
0 |
Send the program a WM_CLOSE message. This is exactly like clicking the "Close" button on the window's title bar. (Default) |
CLOSEWND_TERMINATE |
1 |
Immediately terminate the program's process. The state of global data maintained by the program's dynamic-link libraries (DLLs) may be compromised if this option is used. (When this option is selected, the AutoPlay application calls the Windows API function "TerminateProcess" to immediately terminate the specified program.) |
Re t u r n s
Nothing. You can use Application.GetLastError to determine whether this action failed, and why.
See also: Related Actions
Window.EnumerateProcesses
OverviewExamples
table Window.EnumerateProcesses ( boolean TopLevel = true )
De s cr ip t ion
Returns a table containing a list of all the currently running processes and their associated window handles.
P arame t er s
TopLevel
(boolean) Whether to return information from top level windows only:
VALUE DESCRIPTION |
|||
true |
Return the list for top level windows only. (Default) |
||
false |
Return the list for all available windows. |
||
Note: In order for a window to be classified as a top level window, it must not have an owner window and must be visible. |
Re t u r n s
(table) A table of window handles and the processes they belong to. In this table the window handles are the keys, and the values are the paths to the executables that spawned the processes. If an error occurs, or there were no processes (there should always be processes) nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.