Default AHKv2 File Extension
Default AHKv2 File Extension
Is there a definition for the default file extension of AHKv2 scripts other than the conflicting, ambiguous, .ahk extension?
Re: Default AHKv2 File Extension
a hack workaround was decided to keep the same extension:
https://lexikos.github.io/v2/docs/Program.htm#launcher
details and code here:
viewtopic.php?f=37&t=104935
https://lexikos.github.io/v2/docs/Program.htm#launcher
details and code here:
viewtopic.php?f=37&t=104935
Re: Default AHKv2 File Extension
I realize that the issue is closed for debate, but another reason to have different extensions (and perhaps the reason Alguimist is epsecially interested) is that with different extensions, you can use the same code editor that will apply different syntax highlighting, parameter hints, and other features based on each version.
I also think it would make sense to use .ah or .ah2. The name of the language is AutoHotkey, after all -- not AutoHotKey.
I also think it would make sense to use .ah or .ah2. The name of the language is AutoHotkey, after all -- not AutoHotKey.
Re: Default AHKv2 File Extension
you are absolutely right
everything about V1 or V2 makes me upset
And since I use the portable versions, why couldn't the 2 versions cohabit on my pc?
everything about V1 or V2 makes me upset
And since I use the portable versions, why couldn't the 2 versions cohabit on my pc?
Re: Default AHKv2 File Extension
I think the interpreter should not be responsible for this distinction. And that an AHS extension (such as in "Automation. Hotkeys. Scripting.") should be officially adopted.
Re: Default AHKv2 File Extension
@Alguimist You could be interested in reading this thread that has some comments made by Lexikos: viewtopic.php?f=82&t=108771
Re: Default AHKv2 File Extension
@boiler Not that I disagree with your point, (and chances are you and the others on the thread are already aware of text editors with this functionality), but at the risk of stating the obvious, VS Code -- and probably other editors as well -- supports glob patterns in its JSON settings file, allowing a User to set configurations, not just based on the language / extension of a script file, but based on directory, or any part of the path name. So for instance, you could have it set up so that any file (regardless of what the extension or even if it has no extension) opened in a directory that matches the pattern will open using the settings you chose specifically for version 1 scripts. And you could have an entirely different configuration for files opened in a directory matching the pattern where the file has any level parent folder in the workspace named ahk2, regardless of the script files actual extension.
Again, this is likely news to no one, but I only became aware of it for the first time a couple of weeks ago, having never before seen configurations that allowed wild cards, so the awe/wonder has yet to wear off this old-timer completely.
Code: Select all
*/ahk1/*.*
Code: Select all
*/ahk2/*.*
Again, this is likely news to no one, but I only became aware of it for the first time a couple of weeks ago, having never before seen configurations that allowed wild cards, so the awe/wonder has yet to wear off this old-timer completely.
Return to “AutoHotkey Development”
Who is online
Users browsing this forum: No registered users and 15 guests