Ahk2exe: Passing built-in variables to #include

Report problems with documented functionality
Posts: 7
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] [Download] (Untitled.ahk)GeSHi © Codebox Plus

#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] [Download] (MsgBox.ahk)GeSHi © Codebox Plus

MsgBox, File %A_LineFile% Included

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests