Skip to content

Instantly share code, notes, and snippets.

@tswaters
Last active August 29, 2015 14:04
Show Gist options
  • Save tswaters/d26036395341f5fdc17d to your computer and use it in GitHub Desktop.
Save tswaters/d26036395341f5fdc17d to your computer and use it in GitHub Desktop.
Bind ctrl+shift+alt f1-12 to output various macros files
; bind ctrl+shift+alt f1-12 to output various macros files
Loop 12
{
Hotkey, ^!+f%A_Index%, OutputMacroFile
}
return
OutputMacroFile:
key := RegExReplace(A_thisHotkey, "[+!^]", "")
FileRead, Contents, %AppData%\macros\%key%.txt
if not ErrorLevel ; Successfully loaded.
{
Contents := RegExReplace(Contents, "\n", "")
SendInput, %Contents%
Contents = ; Free the memory.
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment