Force-Quit AutoHotKey Script

Posted: June 30, 2011 by jellymann in computers, hotkeys, keyboard, windows

I noticed that on a Mac, you can force quit an application by pressing Command+Shift+Option+Escape. This is infinitely easier than opening the task manager and clicking to find the process.

Here is an AutoHotKey script I made that force-quits the active application using Control+Shift+Alt+Escape:

!^+Esc::
WinGet,win_n,ProcessName,A
WinGet,win_pid,PID,A
MsgBox, 4, Kill?, Kill %win_n% (%win_pid%)?
IfMsgBox, YES
    Run,taskkill /f /pid %win_pid%,,,
else
	return
return

Or if you prefer not to have a message box, and just plain kill the app:

!^+Esc::
WinGet,win_pid,PID,A
Run,taskkill /f /pid %win_pid%,,,
return
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s