Check if program (non-ahk) responsive/responding

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Redas
Posts: 8
Joined: 04 Jan 2020, 19:11

Check if program (non-ahk) responsive/responding

15 Jun 2021, 04:23

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!
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Check if program (non-ahk) responsive/responding

15 Jun 2021, 06:15

Code: Select all

if DllCall("IsHungAppWindow", "Ptr", WinExist("ahk_exe game.exe"))
	; restart it
kashmirLZ
Posts: 41
Joined: 06 Oct 2022, 23:27

Re: Check if program (non-ahk) responsive/responding

11 Apr 2024, 22:27

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)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 250 guests