Created
March 29, 2019 15:50
-
-
Save mattmc3/7a074f065663ca3a9b6c5919a8783fa9 to your computer and use it in GitHub Desktop.
AHK - AutoHotKey save MSSQL script execution history
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
;CTRL+SHIFT+R run a query, but will also copy the script and save it off | |
;^+r is QWERTY, ^+s is Colemak for ^+r | |
^+r:: | |
Send, ^c | |
EnvGet, HomeDir, USERPROFILE | |
FormatTime, DateString,,yyyyMMdd | |
FormatTime, TimeString,,hhmmss | |
FileCreateDir %HomeDir%\Documents\sqlhist\%DateString% | |
FileAppend, %Clipboard%, %HomeDir%\Documents\sqlhist\%DateString%\%TimeString%.sql | |
Send, {f5} | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment