I have this code sample I found on the web, for some reason I get two prompts to the Log Off window, after these two are gone the windows all get closed which is a good thing. I'm just wondering how I should get rid of those two window prompts, here's the code :
Func killAllWindows()
$WinListArr = WinList()
For $i = 1 To $WinListArr[0][0]
If WinVisible($WinListArr[$i][1]) Then WinClose($WinListArr[$i][1])
Next
EndFunc
Func WinVisible($Title, $Text="")
Return BitAnd(WinGetState($Title, $Text), 2)
EndFunc
killAllWindows()