Check if program (non-ahk) responsive/responding
Check if program (non-ahk) responsive/responding
After a while for some reason, game in which I am using AHK, it stops with window "Program not responding, close it or wait etc.", it's pretty standard, I was googling but didn't find much information, how to make check if program is responding or not, in case it does, carry on, if not restart program. I have check in my script "if Game.exe exist carry on, else restart", but that's not the case, since Game.exe exist, but not responsive. Thank you!
Re: Check if program (non-ahk) responsive/responding
Code: Select all
if DllCall("IsHungAppWindow", "Ptr", WinExist("ahk_exe game.exe"))
; restart it
Re: Check if program (non-ahk) responsive/responding
How does that compare to the other DllCall shown here:
Code: Select all
NR_temp = 0
TimeOut = 100
DllCall("SendMessageTimeout", "UInt", wid, "UInt", 0x0000, "Int", 0, "Int", 0, "UInt", 0x0002, "UInt", TimeOut, "UInt *", NR_temp)