I was going to suggest a launcher that can detect whether the script code is v1 or v2, and run the appropriate version automatically. I wrote the suggestion below, but then decided to test to see if there is a more direct method. I launched some scripts by double clicking on them, and sure enough, they were launched with the appropriate AHK.exe. Apparently the AHK versions I have installed perform this step automatically (even without a #Requires directive).
https://www.autohotkey.com/docs/v2/Program.htm#install
https://www.autohotkey.com/docs/v2/Program.htm#launcher
https://github.com/AutoHotkey/AutoHotkeyUX
https://github.com/AutoHotkey/AutoHotkeyUX/blob/main/launcher.ahk
Statistics: Posted by neogna2 — Today, 17:22