Somewhat silly question about V1 vs V2 Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
toddhere
Posts: 33
Joined: 08 Nov 2016, 09:13

Somewhat silly question about V1 vs V2

05 Mar 2024, 07:38

Hope you'll forgive me for this question: Why is the AHK V1 version being maintained in such a resolute and stubborn manner?

Most other technologies simply move onto new releases without ever looking back.

It just creates so much confusion online; I start reading an official documentation page, only to realize it's for the V1 version, then look to find the V2 version of the same page.

Thanks.
User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Somewhat silly question about V1 vs V2  Topic is solved

05 Mar 2024, 07:43

I'm not an AHK author, but v1 and v2 exist concurrently so that individual users can run scripts of either version. In other words, you can have both a v1 script and a v2 script, and use both. The interpreter that is run will match your script's version. Since v2 has significant syntax changes, this capability precludes having to learn all of the new v2 syntax, for those who would prefer not to translate their v1 scripts. In light of how AHK v2 works, deleting all of the v1 information would do a great disservice to v1 users. V2 cannot be backward-compatible with v1. My term for this would be "accommodating" or "versatile" instead of "stubborn". Users who choose not to install v2 can continue to run their v1 scripts with no changes.

In summary, I would say that AutoHotkey does not fall into a category of "most other technologies".
toddhere
Posts: 33
Joined: 08 Nov 2016, 09:13

Re: Somewhat silly question about V1 vs V2

05 Mar 2024, 07:51

> I would say that AutoHotkey does not fall into a category of "most other technologies"

Yes, you're right, I think that's the crucial observation here. AHK community is unique.

Thank you.
User avatar
Noitalommi_2
Posts: 329
Joined: 16 Aug 2023, 10:58

Re: Somewhat silly question about V1 vs V2

05 Mar 2024, 09:22

toddhere wrote:
05 Mar 2024, 07:38
It just creates so much confusion online; I start reading an official documentation page, only to realize it's for the V1 version, then look to find the V2 version of the same page.
Thanks.
Sounds like you didn't know that you can easily switch between V1 and V2 in the documentation?
Use the (v1/v2) button at the top of the docs page to change the version.
RussF
Posts: 1311
Joined: 05 Aug 2021, 06:36

Re: Somewhat silly question about V1 vs V2

05 Mar 2024, 09:28

toddhere wrote:AHK community is unique.
Not as unique as you might think. Python, one of the most popular programming languages in existence, went from version 2 to version 3 in 2008, yet v. 2 is still being used in thousands of installations because of the vast amount of code already created. V. 3 is not backwards compatible, so it would take countless person-hours to migrate the millions of lines of v. 2 - at an expense not many companies are willing to endure because, "if it works, don't fix it."

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

Re: Somewhat silly question about V1 vs V2

05 Mar 2024, 09:39

That's a good example, Russ. In many situations, packaged commercial programs are also not backwards-compatible when developed into new versions. Some programs like that, when using databases, for example, will offer to convert the entire database to a new format that cannot be retrofitted afterwards. As I recall, though it's been a while, Microsoft did the same when it decided to compress its main document formats into .docx, .xlsx, .pptx, and the like. In this case, however, newer versions of the program can open older formats.
toddhere
Posts: 33
Joined: 08 Nov 2016, 09:13

Re: Somewhat silly question about V1 vs V2

05 Mar 2024, 11:09

Noitalommi_2 wrote:
05 Mar 2024, 09:22
Sounds like you didn't know that you can easily switch between V1 and V2 in the documentation?
Use the (v1/v2) button at the top of the docs page to change the version.
Honestly didn't know! Will try it next time. Thank you.
gregster
Posts: 9113
Joined: 30 Sep 2013, 06:48

Re: Somewhat silly question about V1 vs V2

05 Mar 2024, 11:27

It's only unfortunate that the codeboxes in the v2-related forums still haven't been updated to link to the v2 docs. Instead people still land in the v1 docs. 🤷‍♂️

Code: Select all

msgbox  		; links to v1 docs, although we are in 'Ask for Help v2'
But yes, please use the version selector at the top of any documentation page.

At least there are separate tags for inline use: msgbox (v1: docs tag) vs msgbox (v2: docs2 tag)
Attachments
version selector.png
version selector.png (15.5 KiB) Viewed 652 times
User avatar
boiler
Posts: 17403
Joined: 21 Dec 2014, 02:44

Re: Somewhat silly question about V1 vs V2

05 Mar 2024, 12:48

And the version selector can actually be quite a handy tool for learning v2. If you are not able to find what the equivalent of a v1 function/command or element is in v2, then go to the page or even sub-heading on the page in the v1 documentation, then switch the selector to v2 and it will take you to the equivalent even if it is named something completely different.
User avatar
Chunjee
Posts: 1500
Joined: 18 Apr 2014, 19:05
Contact:

Re: Somewhat silly question about V1 vs V2

06 Mar 2024, 01:13

I visited the python docs and saw about 15 subversions listed


I have Windows 7 on some Laptops and lots and lots of ahkv1 scripts that wouldn't be moved to v2 without hours and hours of rewriting.
User avatar
xMaxrayx
Posts: 237
Joined: 06 Dec 2022, 02:56
Contact:

Re: Somewhat silly question about V1 vs V2

07 Mar 2024, 04:35

the issue most online tuto is for AHKv1 ,I see it's not worth it to convert old project to new AHKv2 but it's better use it with new project.
-----------------------ヾ(•ω•`)o------------------------------
https://github.com/xmaxrayx/
timtak
Posts: 5
Joined: 27 Jan 2017, 00:53

Re: Somewhat silly question about V1 vs V2

07 Mar 2024, 23:05

It is a shame about the lack of backwards compatibility but I am sure it can't be helped.

Is there a way of switching between V1 and V2 syntax within the script so that we could keep our V1 script and tell V2 to use V1 syntax, or for V2 to turn itself off and run V1!?


By the way, this thread has most of the things I wanted to know about V1 vs V2 so I am "piggybacking" here to keep information in the same place but perhaps that is poor etiquette on a forum where there is a "best answer" button (since there cannot be two best answers). I am personally in favour of piggybacking so that information can be kept in the same place, and so that folks know that more than one person is having the same issue.
User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Somewhat silly question about V1 vs V2

08 Mar 2024, 04:56

Each script is for v1 or v2, not both, but a script can run another script of either version. The interpreter is run via a process that is executing the script. These are different programs for v1 and v2. A script can also create another script for either version.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: macromint and 96 guests