I tried changing the window that it looks for, and it didn't seem to work (i.e. neither of the processes was killed). After looking at the task manager, I think that I know why -- both XY processes show up only as "XYPlorer" in the task list, so if that's the title seen by WinNotExist, it would explain why the rest of the window title doesn't work.
So I looked into the docs a bit, and just added the line
SetTitleMatchMode, 2
above the loop, and all appears to work! So the relevant section now looks like this:
Code: Select all
SetTitleMatchMode, 2
loop, 10
{
IfWinNotExist, XYplorer @
continue ; jumps out of the loop if no more XYplorer left
WinKill
Sleep, 1000 ;waits 1000ms for XYplorer to close
}
One other question, though: when I hit the key to update, after the update is complete, the AutoHotKey script that I used terminates itself -- is this normal? I looked for any directives that might control this, and couldn't find anything other than "#Persistent" (which is already there)...
Any thoughts?
Thanks again!
andy