ahk studio v2 version Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
metacognition
Posts: 117
Joined: 22 Oct 2014, 05:57
Location: Alaska
Contact:

ahk studio v2 version

Post by metacognition » 29 May 2023, 01:15

I'm switching to v2 after, geez, 15 years of smooth sailing with autohotkey..... but for the life of me cannot get ahk studio to work, I download the v2 capable version from the-automator's website. I've used omni search to look for settings, I see that it is looking for v2 installed but I can't figure out what to do...
image.png
image.png (85.09 KiB) Viewed 717 times

User avatar
boiler
Posts: 16957
Joined: 21 Dec 2014, 02:44

Re: ahk studio v2 version

Post by boiler » 29 May 2023, 02:40

metacognition wrote: I see that it is looking for v2 installed but I can't figure out what to do...
No, actually, it is not. It is running it as v1 code. That is a v1 error message. Line 4 is v1 code, so it could be that AHK has deduced it should be running your code with v1. Then you follow it with v2 code, so it will not run correctly no matter which version it chooses. Remove the % symbols from line 4, and to ensure it selects v2, put this at the top of your code:

Code: Select all

#Requires AutoHotkey v2.0
It looks like you are probably using the standard v1 template’s 4 lines, none of which should be used for a v2 script, so remove all of those.

User avatar
metacognition
Posts: 117
Joined: 22 Oct 2014, 05:57
Location: Alaska
Contact:

Re: ahk studio v2 version

Post by metacognition » 30 May 2023, 14:02

Thank you Boiler,

I think I'm missing the part where I tell ahk-studio to be v2. When I open a script with v2 it shows this error, and when I hit run nothing happens.
image.png
image.png (80.89 KiB) Viewed 603 times

User avatar
boiler
Posts: 16957
Joined: 21 Dec 2014, 02:44

Re: ahk studio v2 version

Post by boiler » 30 May 2023, 14:18

metacognition wrote: I think I'm missing the part where I tell ahk-studio to be v2.
First make sure that you have v2 installed and that you can run v2 scripts from File Explorer before worrying about running them from AHK Studio. So far, there is no evidence that you have v2 installed at all. Installing a v2 capable version of AHK Studio does not mean you have installed AHK v2.

metacognition wrote: When I open a script with v2 it shows this error, and when I hit run nothing happens.
Actually, this is again evidence that you are not opening your script with v2. That is a v1 error message, and if it was aware you had v2 installed, it would have used it. That message is saying that AHK would like to run it with v2, but it only sees v1 installed.

You might want to show your AHK installation directory (for many/most, it is in "C:\Program Files\AutoHotkey" which would contain a "v2.0.2" or similar folder).

User avatar
metacognition
Posts: 117
Joined: 22 Oct 2014, 05:57
Location: Alaska
Contact:

Re: ahk studio v2 version

Post by metacognition » 30 May 2023, 14:23

Thank you Boiler,

Ok, understood, I did/do have v2 installed.
image.png
image.png (197.11 KiB) Viewed 590 times
image.png
image.png (169.44 KiB) Viewed 590 times
And this is the version of ahk-studio I'm using.
image.png
image.png (75.78 KiB) Viewed 590 times

User avatar
boiler
Posts: 16957
Joined: 21 Dec 2014, 02:44

Re: ahk studio v2 version

Post by boiler » 30 May 2023, 15:18

Did you try running a v2 script from File Explorer (not from AHK Studio) like I suggested?

User avatar
metacognition
Posts: 117
Joined: 22 Oct 2014, 05:57
Location: Alaska
Contact:

Re: ahk studio v2 version

Post by metacognition » 30 May 2023, 15:31

Yes, it appears to run fine. See below.
image.png
image.png (200.63 KiB) Viewed 569 times

User avatar
boiler
Posts: 16957
Joined: 21 Dec 2014, 02:44

Re: ahk studio v2 version  Topic is solved

Post by boiler » 30 May 2023, 16:53

So AHK Studio apparently doesn't know where to find v2, which is odd if it really is the version that supports v2. I don't use it. It would seem that its settings are not pointing to the v2 executable. If you don't see where you would update that, I would ask in the AHK Studio section of the forum, although it doesn't appear that the author has been active on the forum for several months. I don't know what site you downloaded it from, but if they're charging for it, they should be providing support for it, so try reaching out through that site.

User avatar
metacognition
Posts: 117
Joined: 22 Oct 2014, 05:57
Location: Alaska
Contact:

Re: ahk studio v2 version

Post by metacognition » 01 Jun 2023, 00:58

So for any folks looking for v2 mod of ahk-studio, it's available on Joe Glines website, the-automator. He has videos on how to make it work so go to his site and spend a couple bucks to help support his work.

Post Reply

Return to “Ask for Help (v2)”