Ahk2exe: Passing built-in variables to #include Topic is solved

Report problems with documented functionality
Posts: 21
Joined: 09 May 2018, 10:28

Ahk2exe: Passing built-in variables to #include

16 Sep 2018, 02:59

As of AutoHotKey 1.1.28, support was added for all built-in variables in the path passed to #Include.

The following example shows that the compiler does not support all built-in variables yet.
The example requires an include file msgbox.ahk is placed in the folders C:\, the My Documents folder and the scripts folder.

The example can be run directly with autohotkey and shows three message boxes and opens WindowSpy. But when trying to compile using ahk2exe from the included compiler, compilation fails.

The preprocessor from the compiler seems to only support A_LineFile, A_ScriptDir, A_AppsData and A_AppsDataCommon

Code: Select all

#include C:\
#Include %A_MyDocuments%\msgbox.ahk
#Include %A_ScriptFullPath%\..\msgbox.ahk
#Include %A_ScriptName%\..\msgbox.ahk
#Include %A_AhkPath%\..\WindowSpy.ahk

Code: Select all

MsgBox, File %A_LineFile% Included
Posts: 7088
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Ahk2exe: Passing built-in variables to #include  Topic is solved

11 Nov 2018, 02:06

Ahk2Exe v1.1.30.01 adds support for most built-in variables. See #Include.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 4 guests