Future of #Include Handling for Ver 2.0

Discuss the future of the AutoHotkey language
LBJ
Posts: 19
Joined: 10 Aug 2020, 04:22

Future of #Include Handling for Ver 2.0

07 Mar 2022, 01:47

Under Version 1 of AutoHotkey, a script may call a function in an external file without having to use #Include so long as a file of the same name as the function exists in one of the library directories.

This is a really handy functionality which appears to be missing in AutoHotkey V2.

Is this an intended and permanent situation for the V2 stream?

Best regards,

LBJ
User avatar
thqby
Posts: 432
Joined: 16 Apr 2021, 11:18
Contact:

Re: Future of #Include Handling for Ver 2.0

07 Mar 2022, 09:17

Scripts are no longer automatically included from the function library (Lib) folders when a function call is present without a definition, due to increased complexity and potential for accidents (now that the MyFunc in MyFunc() can be any variable). #Include <LibName> works as before. It may be superseded by module support in a future release.

https://lexikos.github.io/v2/docs/v2-changes.htm#functions
LBJ
Posts: 19
Joined: 10 Aug 2020, 04:22

Re: Future of #Include Handling for Ver 2.0

07 Mar 2022, 17:36

Bummer. That was a truly beautiful feature of the language.

I should say that I love almost everything else in the changes from V1 to V2, but I'll miss the smart auto-include feature.

Best regards,

LBJ
User avatar
thqby
Posts: 432
Joined: 16 Apr 2021, 11:18
Contact:

Re: Future of #Include Handling for Ver 2.0

07 Mar 2022, 20:37

ahk_h can use #usestdlib to enable this feature.
LBJ
Posts: 19
Joined: 10 Aug 2020, 04:22

Re: Future of #Include Handling for Ver 2.0

07 Mar 2022, 22:30

thqby wrote:
07 Mar 2022, 20:37
ahk_h can use #usestdlib to enable this feature.

I didn't realize that.

That makes AutoHotkey_H V2 look a lot more interesting.

Thanks very much.

Best regards,

LBJ

Return to “AutoHotkey Development”

Who is online

Users browsing this forum: No registered users and 22 guests