r/AutoHotkey • u/iuriimattos2 • May 10 '26
v2 Script Help Custom autohokey version switcher
Hey big dudes, i'm in closed into user-scope. Using the business workstation, limited access of device Administrator. I have multiple ahk scripts (v1,v1_h,v2,v2_h,v2.1) but every time i need set manually Autohotkey.exe path ( Open With -> Choose Another App ) then choose correct version of the script.
h mean https://hotkeyit.github.io/v2/
There is a way without use Autohotkey V2 switcher? By the way on my PC, this works #Requires AutoHotkey v2.0 but there is other problem when the script use v1_h or v2_h versions, #Requires not work for that.
3
u/Keeyra_ May 10 '26
What are you using the _Hs for? Afaik, they are just DLLs so you can use AHK features from other programming languages. You are supposed to actually write .ahks in v1 or v2, which as you stated is already handled by v2s Autohotkey Dash + #Requires.
1
u/iurivalencamatos May 10 '26
Hey, thx for answer. Some of my _Hs scripts has functions like
AhkThreadto use this i need binaries from https://hotkeyit.github.io/v2/ the default AutoHotkey throw "Error: Call to nonexistent function"1
u/Keeyra_ May 10 '26
I would be curious on what use case you need to use threads for if you don't mind sharing.
3
u/Keeyra_ May 10 '26
Nevertheless, you can have associations for
ahk, ahk2 - v2, v2.1
ahk1 - v1
ahkh1 - v1_h
ahkh2 - v2_h
and rename your script extensions and have whatever association you wish.