Last active
January 10, 2023 14:49
-
-
Save Jaid/41f660b57989f2b82f53c8a287040b17 to your computer and use it in GitHub Desktop.
Debug log with function with line break (which the built-in log function does not do) in AutoHotkey v2
This file contains hidden or 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
| ; From https://gist.github.com/Jaid/41f660b57989f2b82f53c8a287040b17 | |
| print(message, title := unset) { | |
| if IsSetRef(&title) { | |
| print title ": " message | |
| } else { | |
| ; Output for exe files | |
| /*@Ahk2Exe-Keep | |
| FileAppend message "`n", "*" | |
| */ | |
| ; Output for ahk files | |
| ;@Ahk2Exe-IgnoreBegin | |
| OutputDebug message "`n" | |
| ;@Ahk2Exe-IgnoreEnd | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment