compiled scripts versus regular scripts

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
jeeswg
Posts: 6902
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
https://autohotkey.com/boards/viewtopic.php?f=37&t=41870&p=239463#p239463
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: compiled scripts versus regular scripts

16 Sep 2019, 15:54

As part of:
AutoHotkey via DllCall: AutoHotkey functions as custom functions - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=37871

I was wondering if there was any to tell if a script is compiled or not, other than checking A_IsCompiled. Thanks.
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 (v1)”

Who is online

Users browsing this forum: mapcarter, Marium0505, Rohwedder and 364 guests