Created
July 14, 2020 23:39
-
-
Save ArthurSchiavom/da1ce4e23c6a5017352f63e0a5fb6fc6 to your computer and use it in GitHub Desktop.
Kill a process by pressing 2 keys (alt+z)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
if not A_IsAdmin | |
{ | |
Run *RunAs "%A_ScriptFullPath%" | |
ExitApp | |
} | |
ProcessExist(Name){ | |
Process,Exist,%Name% | |
return Errorlevel | |
} | |
proc = YourProcessExecutable.exe | |
!z:: | |
If ProcessExist(proc) | |
Process, Close, %proc% | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment