Version selection menu shown even with #Requires AutoHotkey >=2.0 Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
JoeSchmoe
Posts: 129
Joined: 08 Dec 2014, 08:58

Version selection menu shown even with #Requires AutoHotkey >=2.0

Post by JoeSchmoe » 27 Mar 2023, 09:59

Hi everyone,

When I run the following script, the AHK launcher asks which version of AHK I want to run the code with:

Code: Select all

#Requires AutoHotkey >=2.0

MsgBox "Hi"
Specifically, I get a standard dialog box that asks,
"Run Code quick tester.ahk with...
  • 1.1.36.02 Unicode 64-bit
  • 2.0.2 64-bit
Shouldn't the presence of #Requires AutoHotkey >=2.0 mean that I don't have to go through that prompt? Sorry if I'm being dull!

User avatar
mikeyww
Posts: 26857
Joined: 09 Sep 2014, 18:38

Re: Version selection menu shown even with #Requires AutoHotkey >=2.0  Topic is solved

Post by mikeyww » 27 Mar 2023, 10:15

Hi,

I cannot speak for the author, but it seems possible that this will allow a future version to be selected (2, 3, 4, etc.). I use the following, which is a bit different and prevents the selection prompt.

Code: Select all

#Requires AutoHotkey v2.0
MsgBox "Hi"
A_AhkVersion is required to be greater than or equal to this version, but less than the next major version.

User avatar
JoeSchmoe
Posts: 129
Joined: 08 Dec 2014, 08:58

Re: Version selection menu shown even with #Requires AutoHotkey >=2.0

Post by JoeSchmoe » 27 Mar 2023, 10:32

That fixed it immediately. Thanks!

Is this something that Lex would want to know about, do you think? Or does he have weightier things on his mind? If he'd want to know, would I post in bug or feature request subforums?

Keywords: launcher, autodetect, version detection.

User avatar
mikeyww
Posts: 26857
Joined: 09 Sep 2014, 18:38

Re: Version selection menu shown even with #Requires AutoHotkey >=2.0

Post by mikeyww » 27 Mar 2023, 10:35

If your wish is for the prompt not to occur, you could post it on the wish list if it is not already there.

viewforum.php?f=13

Post Reply

Return to “Ask for Help (v2)”