Last active
January 26, 2017 17:54
-
-
Save davebrny/ffb37b346ecc4ac80446f9958cd78574 to your computer and use it in GitHub Desktop.
(autohotkey) - save to close any ahk error windows
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
#if winActive("ahk_class Notepad") | |
or winActive("ahk_class Notepad++") | |
or winActive("ahk_exe sublime_text.exe") | |
~^s::goSub, close_ahk_errors ; ctrl + s (~pass through) | |
#if | |
close_ahk_errors: | |
groupAdd, ahk_error, ahk_exe AutoHotkey.exe, The script was not reloaded | |
groupAdd, ahk_error, ahk_exe AutoHotkey.exe, The current thread will exit | |
groupAdd, ahk_error, ahk_exe AutoHotkey.exe, The program will exit | |
if winExist("ahk_group ahk_error") | |
{ | |
loop, | |
winClose, ahk_group ahk_error | |
until !winExist("ahk_group ahk_error") | |
} | |
return | |
/* | |
[script info] | |
version = 2.1 | |
description = save (ctrl + s) to close any ahk error windows | |
author = davebrny | |
source = https://gist.github.com/davebrny/ffb37b346ecc4ac80446f9958cd78574 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment