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
Future of #Include Handling for Ver 2.0
Re: Future of #Include Handling for Ver 2.0
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
https://lexikos.github.io/v2/docs/v2-changes.htm#functions
Re: Future of #Include Handling for Ver 2.0
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
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
Re: Future of #Include Handling for Ver 2.0
ahk_h can use #usestdlib to enable this feature.
Return to “AutoHotkey Development”
Who is online
Users browsing this forum: No registered users and 19 guests