compiled scripts versus regular scripts

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Posts: 6473
Joined: 19 Dec 2016, 01:58
Location: UK

compiled scripts versus regular scripts

19 Oct 2018, 17:07

- 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
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], Odlanir, scriptors and 133 guests