punisa Posted January 13, 2009 Share Posted January 13, 2009 Good morning (CET)! I'm configuring a PC for public display only, it will run Media Player Classic in Fullscreen. As I won't be around once it gets installed, I need to make sure it runs fine. I found this code which I recall did work: If _NotResponding("Media Player", "", 1) Then Else EndIf Func _NotResponding($title, $text, $closeIfHung = 0) $hWnd = WinGetHandle($title, $text) If $hWnd == "" Then 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 But how do I test it ? Obviously I need to make MPC non responsive first, any trick how would I do that? I tried some shady stuff, like loading false files, but MPC is one brave piece of freeware it is Anyways, all suggestions are welcome carpe diem Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 13, 2009 Share Posted January 13, 2009 Good morning (CET)! I'm configuring a PC for public display only, it will run Media Player Classic in Fullscreen. As I won't be around once it gets installed, I need to make sure it runs fine. I found this code which I recall did work: If _NotResponding("Media Player", "", 1) Then Else EndIf Func _NotResponding($title, $text, $closeIfHung = 0) $hWnd = WinGetHandle($title, $text) If $hWnd == "" Then 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 But how do I test it ? Obviously I need to make MPC non responsive first, any trick how would I do that? I tried some shady stuff, like loading false files, but MPC is one brave piece of freeware it is Anyways, all suggestions are welcome You might be able to suspend it's process. It has been discussed on this forum, so try the search. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
punisa Posted January 13, 2009 Author Share Posted January 13, 2009 You might be able to suspend it's process. It has been discussed on this forum, so try the search. "suspend process" is the magic word ! Thanks : ) I was searching high and low, but didn't have a clue what to type in. carpe diem Link to comment Share on other sites More sharing options...
youknowwho4eva Posted January 13, 2009 Share Posted January 13, 2009 You want to break windows media player? Hmmm usually it's not to much of a problem to break anything Microsoft makes Giggity 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