Page 1 of 3

AutoHotkey v2.0-beta.1

Posted: 24 Jul 2021, 19:28
by lexikos
AutoHotkey v2.0-beta.1 is now available.

Any further changes prior to the final v2.0.0 release should be of a minor nature (such as improvements to the error and warning dialogs), and should not affect the functionality of scripts. In other words, future releases are expected to be backward-compatible with this one.

This release does not include an installer, but it is in the works.

AutoHotkey v2 (about and downloads)

SHA256 hash

Changes in this release:

Fixed detection of unexpected Catch following Try/Catch/Else.
Changed Try..Else to unconditionally raise a load-time error.
Fixed anonymous functions unable to reference subsequent closures.
Fixed anonymous closures to be instantiated only once.
Changed DBPp context_get to exclude closure constants.

Minor maintenance

Re: AutoHotkey v2.0-beta.1

Posted: 25 Jul 2021, 01:05
by Aetzbarr
Congrats!

Don't forget to change the link "Download v2 Alpha" to "Download v2 Beta". :D
https://www.autohotkey.com/

1. Will v1 be updated until the final v2.0.0 is released?
2. Where can I find instructions for compiling without a .bin file?
3. Will the final v2.0.0 release include a compiler? or window spy?

Re: AutoHotkey v2.0-beta.1

Posted: 25 Jul 2021, 05:08
by lexikos
There are some changes queued for v1.1.34. I don't intend to do much more with v1, but may continue applying bug fixes whenever it takes my interest. I make no promises.

The latest version of Ahk2Exe on GitHub supports the use of a v1.1.34+ or v2.0-a135+ .exe in place of a .bin file. Use that.
https://github.com/AutoHotkey/Ahk2Exe

Ahk2Exe is a v1 script. At this point, I do not plan to include Ahk2Exe in the v2 downloads, but the v2 installer will support installation and use alongside v1. The downloads will include Window Spy for v2.

Re: AutoHotkey v2.0-beta.1

Posted: 25 Jul 2021, 06:32
by AHK_user
:bravo: :dance: :superhappy:

Great work!!!

Now I will start to use v2 in new projects, and translate some v1 code and libraries.

Re: AutoHotkey v2.0-beta.1

Posted: 25 Jul 2021, 08:56
by SAbboushi
Congrats! Great work!

Re: AutoHotkey v2.0-beta.1

Posted: 25 Jul 2021, 08:57
by TheArkive
It will be fun to see the uptick of activity in the AHK v2 subforum :D

Re: AutoHotkey v2.0-beta.1

Posted: 25 Jul 2021, 22:33
by iseahound
Congrats!

Re: AutoHotkey v2.0-beta.1

Posted: 26 Jul 2021, 03:17
by SKAN
Congrats to the AHK community.
Many thanks to @lexikos.
🙏

Re: AutoHotkey v2.0-beta.1

Posted: 26 Jul 2021, 09:36
by joedf
This is a big annnouncement! :thumbup: :clap:
I think I might have to start using v2 more... :geek:

Re: AutoHotkey v2.0-beta.1

Posted: 26 Jul 2021, 13:44
by ahk7
Congrats! Perhaps make it sticky in other sub-fora so more people will see it and try it out (just to have more testers)?

Re: AutoHotkey v2.0-beta.1

Posted: 26 Jul 2021, 14:36
by fincs
This is a major milestone for the future of AutoHotkey. It's hard to believe v2 has been in development for over 10 years, but it looks like we're finally seeing the light at the end of the tunnel :)

Finally stabilising the syntax/behaviour/feature set is going to be a big deal for the adoption of v2, I expect :thumbup:

Re: AutoHotkey v2.0-beta.1

Posted: 26 Jul 2021, 20:14
by hyaray
I use ahk for 6 years. still be trapped at v2-a102 :headwall: :headwall:
v1 to v2 a-102 is simple.
v103 to beta Changes a lot, and many changes is hard to deal.
It's important to tell people how to update.
We need demo for "dllcall" and "buffer" and so on...

Re: AutoHotkey v2.0-beta.1

Posted: 26 Jul 2021, 21:59
by swagfag
hyaray wrote:
26 Jul 2021, 20:14
It's important to tell people how to update.
update... from what? u cant possibly expect a migration guide for any random past alpha version. read the changelog and update accordingly.
for v1 there is https://lexikos.github.io/v2/docs/v2-changes.htm
We need demo for "dllcall" and "buffer" and so on...

Code: Select all

#Requires AutoHotkey v1.1.33.09
VarSetCapacity(BigStruct, 64, 0xAB)
DllCall("somefunc", "Ptr", &BigStruct, "UInt", 64, Float, 123.456, "Ptr*", pAnotherThing, "Double")

#Requires AutoHotkey v2.0-beta.1
BigStruct := Buffer(64, 0xAB)
DllCall('somefunc', 'Ptr', BigStruct, 'UInt', BigStruct.Size, 'Float', 123.456, 'Ptr*', &pAnotherThing := 0, 'Double')

Re: AutoHotkey v2.0-beta.1

Posted: 27 Jul 2021, 03:04
by Aetzbarr
It will be very helpful if there will be a thread dedicated to v2 beta updates (similar to this one https://www.autohotkey.com/boards/viewtopic.php?f=37&t=2120) or the changes will be documented here https://lexikos.github.io/v2/docs/ChangeLog.htm

Re: AutoHotkey v2.0-beta.1

Posted: 27 Jul 2021, 03:16
by vvhitevvizard
Its been a while since AHK V2 became pretty much stable but people avoided it due to "alpha" monicker. :D
Congratulations to the AHK community!
swagfag wrote:
26 Jul 2021, 21:59
update... from what? u cant possibly expect a migration guide for any random past alpha version. read the changelog and update accordingly.
I believe the community do need migration guides listing literal examples. AHK v1 -> AHK v2 side by side. So that people could refer to those know-how examples instead of browsing changelogs.
Aetzbarr wrote:
27 Jul 2021, 03:04
It will be very helpful if there will be a thread dedicated to v2 beta updates (similar to this one https://www.autohotkey.com/boards/viewtopic.php?f=37&t=2120)
Agree! It was very convenient to have such a topic in bookmarks listing all the changes made in one place.

Re: AutoHotkey v2.0-beta.1

Posted: 27 Jul 2021, 03:23
by TheArkive
For those wishing to understand the changes in AHK v2, may I recommend the following:
I'll be watching the help forums and doing my best to help explain the differences in AHK v2.

Re: AutoHotkey v2.0-beta.1

Posted: 27 Jul 2021, 03:34
by vvhitevvizard
TheArkive wrote:
27 Jul 2021, 03:23
I'll be watching the help forums and doing my best to help explain the differences in AHK v2.
U've done great job converting lots of AHK v1 scripts recently! Please make sure u do not discard original AHK V1 scripts so that the community could compare the conversion steps required.

Re: AutoHotkey v2.0-beta.1

Posted: 27 Jul 2021, 03:38
by TheArkive
vvhitevvizard wrote:
27 Jul 2021, 03:34
TheArkive wrote:
27 Jul 2021, 03:23
I'll be watching the help forums and doing my best to help explain the differences in AHK v2.
U've done great job converting lots of AHK v1 scripts recently! Please make sure u do not discard original AHK V1 scripts so that the community could compare the conversion steps required.
Thanks! :D

I always reference/link/credit the original script where possible. The only example I can think of where I didn't do that is my version resource editing class. Mine was so fundamentally different from the VerResource.ahk lib file in Ahk2Exe that I did mention it as inspiration, but I didn't bother linking to it.

EDIT: I'll go through my scripts now and make sure all those links are still there and are active.

Re: AutoHotkey v2.0-beta.1

Posted: 27 Jul 2021, 09:10
by neogna2
Props to Lexikos for all the great work on AutoHotkey.
vvhitevvizard wrote:
27 Jul 2021, 03:16
I believe the community do need migration guides listing literal examples. AHK v1 -> AHK v2 side by side.
Yes.
It would also help to have a handy way to view the v2 and v1 documentation side by side with changes highlighted in the v2. Like a fancy diff tool. I don't know how difficult it would be to create a modified version of AutoHotkey.chm that shows two panes with the v2 and v1 text.
We can unpack AutoHotkey.chm locally to individual .html files
C:\Windows\hh.exe -decompile C:\outputfolder AutoHotkey.chm

Re: AutoHotkey v2.0-beta.1

Posted: 30 Jul 2021, 05:29
by AHK_user
Is there by any chance a syntax file of all the commands and functions available?

Something with similar data as used in the editor AHK Studio Master :
AHK-Studio-master\lib\Languages\ahk.xml

I can webscrape it from the helpfiles in not available :D, but if it already exists :D
ahk.xml
(45.35 KiB) Downloaded 458 times