v2 Alpha - will my old code still work?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
omar
Posts: 545
Joined: 22 Oct 2015, 17:56

v2 Alpha - will my old code still work?

Post by omar » 27 Mar 2019, 05:05

I see V2 Alpha is on the front page of AHK website now as a download.

If I replace my current AHK - always gone for the default version...
Will my old scripts still work the same? Or is there some difference and I need to make changes to my code?

Thanks.
User avatar
Tigerlily
Posts: 377
Joined: 04 Oct 2018, 22:31

Re: v2 Alpha - will my old code still work?

Post by Tigerlily » 27 Mar 2019, 05:14

omar wrote:
27 Mar 2019, 05:05
I see V2 Alpha is on the front page of AHK website now as a download.

If I replace my current AHK - always gone for the default version...
Will my old scripts still work the same? Or is there some difference and I need to make changes to my code?

Thanks.
Some old scripts will not work the same, or will not work at all - here are the changes:

https://www.autohotkey.com/v2/v2-changes.htm

I personally have not yet made the switch because I have scripts needed for work that won't transfer over. Thinking about making the switch onces it gets out of alpha.. v2 looks like more fun and has more useful built-in functionalities.
-TL
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: v2 Alpha - will my old code still work?

Post by SOTE » 27 Mar 2019, 07:24

omar wrote:
27 Mar 2019, 05:05
I see V2 Alpha is on the front page of AHK website now as a download.

If I replace my current AHK - always gone for the default version...
Will my old scripts still work the same? Or is there some difference and I need to make changes to my code?

Thanks.
Your AHKv1 scripts will very likely not work with AHKv2. You will be forced to keep using the AHKv1 interpreter or will need to convert most of your code from AHKv1 syntax to AHKv2 syntax. For people with large scripts (over hundreds or thousands of lines of code) or with a large number of scripts, conversion could be a major pain.

An AHK guide and scripts that help convert AHKv1 syntax to AHKv2 syntax will be a major help. The better the guides and conversion scripts, the less painful the transition.

The AutoHotkey member jeeswg has done a number of posts about converting AHKv1 scripts to AHKv2.

AHK v1 to AHK v2 conversion tips/changes summary
(https://www.autohotkey.com/boards/viewtopic.php?t=36787)

AHK v1 to AHK v2 converter
(https://www.autohotkey.com/boards/viewtopic.php?f=37&t=36754)
User avatar
kczx3
Posts: 1649
Joined: 06 Oct 2015, 21:39

Re: v2 Alpha - will my old code still work?

Post by kczx3 » 27 Mar 2019, 19:43

Tigerlily wrote:
27 Mar 2019, 05:14
omar wrote:
27 Mar 2019, 05:05
I see V2 Alpha is on the front page of AHK website now as a download.

If I replace my current AHK - always gone for the default version...
Will my old scripts still work the same? Or is there some difference and I need to make changes to my code?

Thanks.
I don’t believe those changes are completely up to date

Some old scripts will not work the same, or will not work at all - here are the changes:

https://www.autohotkey.com/v2/v2-changes.htm

I personally have not yet made the switch because I have scripts needed for work that won't transfer over. Thinking about making the switch onces it gets out of alpha.. v2 looks like more fun and has more useful built-in functionalities.
Post Reply

Return to “Ask for Help (v2)”