Before the main window can be closed, must all other windows, which been opened from the program, be terminated.
Now I use the method below, to close the windows - a dozen different windows can be open (not at the same time)
Code: Select all
Process Exist, Label32.exe
LabelPID = %ErrorLevel%
IfWinExist ahk_class #32770 ahk_pid %LabelPID%
{
WinActivate ahk_class #32770 ahk_pid %LabelPID%
WinWaitActive ahk_class #32770 ahk_pid %LabelPID%
WinClose ahk_class #32770 ahk_pid %LabelPID%
}
For stable closing of a window, is it best to use .: "WinActivate" and "WinWait"?
One window has the following "name" .: ahk_class #32770
Even if the program is not running, the ahk_class #32770 exist....
Is the ahk_class #32770, running on all computers?
What's the problem? (or the solution?)
//Jan