ShadoWarrior Posted March 16, 2010 Share Posted March 16, 2010 is there a way i can tell if a *.exe app is "not responding" in windows? maybe something related with "ProcessGetStats" Link to comment Share on other sites More sharing options...
trancexx Posted March 16, 2010 Share Posted March 16, 2010 Your *.exe app or any *.exe app? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 16, 2010 Share Posted March 16, 2010 (edited) If _NotResponding("TITLE HERE", "TEXT HERE[OPTIONAL]", 1) Then; The last parameter indicates whether you want to close the hung app or not. MsgBox(0,"", "Hung Application, closing app now.") Else MsgBox(0,"", "Application running as intended.") EndIf Func _NotResponding($title, $text, $closeIfHung = 0) $hWnd = WinGetHandle($title, $text) If $hWnd == "" Then MsgBox(0,"Error","Could not find window") Exit EndIf $retArr = DllCall("user32.dll", "int", "IsHungAppWindow", "hwnd", $hWnd) If @error == 0 Then If $retArr[0] == 1 Then If $closeIfHung Then ProcessClose(WinGetProcess($title, $text)) EndIf Return 1 EndIf Else Return 0 EndIf EndFunc Edited March 16, 2010 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
kaotkbliss Posted March 16, 2010 Share Posted March 16, 2010 If _NotResponding("TITLE HERE", "TEXT HERE[OPTIONAL]", 1) Then; The last parameter indicates whether you want to close the hung app or not. MsgBox(0,"", "Hung Application, closing app now.") Else MsgBox(0,"", "Application running as intended.") EndIf Func _NotResponding($title, $text, $closeIfHung = 0) $hWnd = WinGetHandle($title, $text) If $hWnd == "" Then MsgBox(0,"Error","Could not find window") Exit EndIf $retArr = DllCall("user32.dll", "int", "IsHungAppWindow", "hwnd", $hWnd) If @error == 0 Then If $retArr[0] == 1 Then If $closeIfHung Then ProcessClose(WinGetProcess($title, $text)) EndIf Return 1 EndIf Else Return 0 EndIf EndFunc Other than the obvious that this program closes a hung app, maybe an elaboration on it 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
ShadoWarrior Posted March 20, 2010 Author Share Posted March 20, 2010 tnx a lot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now