Search the Community
Showing results for tags 'locked up'.
Full-Screen Crash Recovery 1.0 Crashed programs or games with screens that won't go away? Ctrl-Alt-Del, Alt-F4, Alt-Tab, and the Windows Key not working for ya? Do you find that you can 'almost' just get out of a game screen, but see constant flicker and only parts of the Windows desktop or mouse pointer? Want a fix for all that crap? Here it is. This bad boy will drop that program and kick it to the curb. public/style_emoticons/autoit/laugh.gif =P So what's it all about? This program uses Yashied's 'HotKey.au3' UDF to track keypresses and looks for this combo: Shift-Alt-Del (easy enough to remember eh?) Once you press that combo, my program will kick in and start analyzing the Windows on the screen - finding at most two windows that have full-screen or maximized status (there is a difference in Window's world). If the *active* window is the one that matches those criteria, it is chosen as the 'target' (otherwise, the first found non-Explorer window will be the target). Now, I'm all about safety (preventing accidents) - but I'm also all about killing something if it's really crashed. So what my program does on each hotkey press is this: On the 1st Shift-Alt-Del press, the program determines if the 'target' Window it finds is Hung/Crashed using a quick method. If Window reports that it is - it's killed on the spot, and the cycle resets. If not, it will save the 'target' info for the proceeding hotkey presses.On the 2nd Shit-Alt-Del press, the program will look again through the Window list. If it finds the same 'target', it will again check if the program is Hung/Crashed or Suspended (if so, kill & reset). This process can take up to 5 seconds, especially for a suspended app. Now, since the app was found twice, and is responding to messages, my program will attempt to alter a window's 'Always-on-Top' status and Minimize it. Sometimes (!!) this may solve the case (other times, not-so-much). On the 3rd Shift-Alt-Del press, the program will search again as above, compare the window to the last one, and if it's the same, and still in full-screen/maximized state, it will finally say 'screw it', and just terminate the application.At each step, you'll get a speaker Beep confirmation (if you don't have an internal PC speaker, you can alter the Beeps to 'SoundPlay()' or somesuch). In any case, the Beeps are like this. (thanks montymintypie for suggesting this): low beep = no window found in maximized/full-screen statushigh beep = window found, but Windows isn't reporting it is hungdual-tone beeps (mid-then-high) = Window terminated.In addition, if the hotkey to close the app down is pressed, you'll get a reverse dual-tone-beep (high-low) meaning its shut down. By the way, that hotkey is: Shift-ALT-Q (terminate my program) The reason for this 'third-times-a-charm' thinking is that: You want to be sure that you really wanted to close that app (if for some reason Windows reports the app as crashed though, there's no 2nd or 3rd time),Sometimes minimizing actually does work, andIf you were able to close/minimize the application, and switched to another and maximized/full-screened it, the code will recognize that the screen is no longer in that maximized/full-screen state, and simply reset its internal variables (and the HotKey-press count will reset to 0)NOTES: Any window owned by Explorer.exe process will be IGNORED, with the exception that if explorer.exe itself has crashed (and pulled other windows into its vortex), it will allow it to be terminated (and then restarted). But under typical circumstances, it will differentiate the Explorer Windows from regular Application/Game windows, and by doing so, prevent accidental closure of the main Windows interface!As stated above, any time the same app is not found to be minimized, it will reset the internal count and variables, so the HotKey-press count will reset to 0.Get it now at http://sites.google.com/site/ascend4ntscode/fullscreencrashrecovery A list of the major enhancements/changes since I started (prior to v. 1.0!): Added two methods for detecting if an application is hung/crashed/suspendedRewrote a LOT of the code based on my own experiences with crashes (both in XP and Vista, applications and games)Separated functions to make it easier to understand and centralized Debug messages in case you'd like to output them to a log.Rewrote the main function AGAIN, due to certain Win..() functions in AutoIT failing to work on crashed applications (I've remarked about these functions and my experiences with them in the source code right under the header) Added better 'beep-notifications' (thanks to montymintypie for getting me to do that)Ascend4nt's Program License agreement: While I provide this program freely, if you do distribute the program, the only requirements I have are: I (Ascend4nt) must be Acknowledged as the authorThe License agreement document (in the ZIP file) must be kept bundled together with the code.A link must be provided to the page containing the program (linked above)Do *not* under any circumstances 'reverse-engineer' the code - in other words, do not pull out the source code. I may distribute the source code in the future - but if you have or find an old copy of my code, do not distribute it without my consent, which must be obtained through the 'ContactMe' page on this site.