Skip to content

Instantly share code, notes, and snippets.

@davebrny
Last active January 26, 2017 17:54
Show Gist options
  • Save davebrny/ffb37b346ecc4ac80446f9958cd78574 to your computer and use it in GitHub Desktop.
Save davebrny/ffb37b346ecc4ac80446f9958cd78574 to your computer and use it in GitHub Desktop.
(autohotkey) - save to close any ahk error windows
#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