- With regard to tutorials and AHK v2 development, I'm interested in any differences between regular scripts and compiled scripts.
- E.g. any tips re. what differences you need to be aware of when writing a script that you know is going to be compiled. Thanks.
- Some differences:
- A_IsCompiled is set to 1 for compiled scripts.
- A_AhkPath behaves differently.
- A_LineNumber may differ, because any included files are merged.
- (A_LineFile will differ.)
- (A_ScriptDir/A_ScriptFullPath/A_ScriptName will differ.)
- (Note: A_AhkVersion will report the version used to compile the script.)
- The Edit command has no effect when used from within a compiled script.
- The Menu command (AHK v1), or A_AllowMainWindow (AHK v2), controls whether the main window of a compiled script can be opened.
- The FileInstall command is more limited for regular scripts.
- The DebugVars script doesn't work on compiled scripts.
- According to this link. A_ScriptDir is the folder containing the script (ahk file). If the script is compiled, A_ScriptDir is the folder containing the compiled script (exe file).
A_ variables - Page 2 - AutoHotkey Community
Get help with using AutoHotkey and its commands and hotkeys
1 post • Page 1 of 1