AHK Versions

Discuss Autohotkey related topics here. Not a place to share code.
Forum rules
Discuss Autohotkey related topics here. Not a place to share code.
Ben the Coder

AHK Versions

Post by Ben the Coder » 09 Aug 2022, 09:34

What version of AHK would you say is the "best" version? The least buggy, the most functions, etc, etc.
Can anyone tell me?

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: AHK Versions

Post by joedf » 09 Aug 2022, 12:55

For now, I recommend just sticking to the latest v1.1+
Eventually, v2 will be out of beta, but not for a while at least.
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

Ben the Coder

Re: AHK Versions

Post by Ben the Coder » 09 Aug 2022, 20:02

Ok. :)

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AHK Versions

Post by SOTE » 17 Aug 2022, 05:30

joedf wrote:
09 Aug 2022, 12:55
For now, I recommend just sticking to the latest v1.1+
Eventually, v2 will be out of beta, but not for a while at least.
Agree, would go with v1.1+ because of so much help, videos, ebooks, and libraries. Could be argued that v2 is more for those that don't mind being more on the cutting edge, are experimenting, or not relying on scripts for anything important (which is relative). Though with that typed, v2 will be very well tested when it comes out of beta, and will have accumulated a lot of answers on its growing v2 Help and gained more (including translated from v1) libraries. This will help with a smoother transition, when the time comes.

Ben the Coder

Re: AHK Versions

Post by Ben the Coder » 17 Aug 2022, 09:13

I'll stick with 1.1+ then. ;)

AHK_user
Posts: 515
Joined: 04 Dec 2015, 14:52
Location: Belgium

Re: AHK Versions

Post by AHK_user » 17 Aug 2022, 14:32

My opinion is a little bit different, it is true that the most libraries, tutorials, forum examples are in V1, but a lot of the experts who are maintaining them are switching graduately to v2, that has a lot of interesting features and has more predictable syntax.

If you are planning to use a lot of guis or menus, I would certainly recommend V2, as it is more logical and cleaner.

Without doubt, V2 is the future, and I have not encountered any bugs in it.

V1 will keep existing, but probably not be maintained in the end.

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: AHK Versions

Post by gregster » 17 Aug 2022, 14:46

AHK_user wrote:
17 Aug 2022, 14:32
If you are planning to use a lot of guis or menus, I would certainly recommend V2, as it is more logical and cleaner.
Sure, but if your are also dependent on some library that others would have to translate for you, that won't help much.
So, like always, it depends... but it doesn't have to be either or. Use both versions ;)

Ben the Coder

Re: AHK Versions

Post by Ben the Coder » 18 Aug 2022, 18:48

I'll download v2 then.
Thanks!

User avatar
tidbit
Posts: 1272
Joined: 29 Sep 2013, 17:15
Location: USA

Re: AHK Versions

Post by tidbit » 22 Aug 2022, 14:27

not a fan of v2, especially its guis.
IMO you'd be better off learning c# or something, v2 IMO shares little in common with ahk, especially it's friendliness. Just shares the project name and most function names. Everything else is a completely different language. I picked up c# much much faster than v2/
rawr. fear me.
*poke*
Is it December 21, 2012 yet?

Ben the Coder

Re: AHK Versions

Post by Ben the Coder » 22 Aug 2022, 19:41

Good to know! :)

Ben the Coder

Re: AHK Versions

Post by Ben the Coder » 22 Aug 2022, 19:43

gregster wrote:
17 Aug 2022, 14:46
AHK_user wrote:
17 Aug 2022, 14:32
If you are planning to use a lot of guis or menus, I would certainly recommend V2, as it is more logical and cleaner.
Sure, but if your are also dependent on some library that others would have to translate for you, that won't help much.
So, like always, it depends... but it doesn't have to be either or. Use both versions ;)
What do you mean,
use both versions
:?:

lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: AHK Versions

Post by lexikos » 26 Aug 2022, 18:29

tidbit wrote:
22 Aug 2022, 14:27
v2 IMO shares little in common with ahk,
v2 shares nearly all of its basic syntax with v1.

especially it's friendliness.
Please explain.

Everything else is a completely different language.
Is that criticism or a compliment?

I would recommend no one take those words at face value. I think that an objective comparison could not possibly support the conclusion that they are completely different.

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AHK Versions

Post by SOTE » 27 Aug 2022, 05:02

My take on these interesting perspectives, is that AHK v2 is like the inevitable up and coming young contender that will one day become the champ. Where with AHK v1.1, it's like a battle hardened veteran and old champ, where we can all see the end coming. But the old champ (AHK v1.1) still has some fights left, and won't give up the title easily. We all know this story and how it ends, just like AHK "Classic" had to give up its top spot to AHK v1.1. The thing about that though, it was not an instant switch, but a gradual process. Often, that's how it goes, in other languages as well. As to which direction to go with at the present, is really a matter of the needs of particular people, and probably how familiar they are with programming overall.

Looking at where we are now, maybe there could have been a smoother bridge built or lesser jump between the versions of AHK v1.1 to AHK v2. Where AHK v1.1 help files and newer versions kept a constant and greater focus on deprecating on what would not exist in AHK v2. Where there was more emphasis on guiding users to writing AHK v1.1 code to be more like AHK v2 code, while still having backwards compatibility for scripts veterans have been using for years. Including AHK v1.1 to AHK v2 conversion scripts and info. Yes, that stuff does exist. I'm just saying that the scale, might have been turned up even more. Not in any kind of forceful or abrupt way, but more in a guiding effort.

AHK v1.1 is partially a victim of its own wonderful success. So much help material, ebooks, videos, and libraries on it. Often so reliable, after the creation and troubleshooting process, that lots of people don't want to redo their scripts or are very satisfied with what they have. As it is, AHK v2 material is gradually coming. I like the efforts (to name a few AHKers) of Joe Glines (https://www.youtube.com/c/JoeGlines-Automator/videos) and Jack Motley (https://jacks-autohotkey-blog.com/autohotkey-topics-and-series/a-peek-at-the-coming-autohotkey-v2-0/) in helping prepare the way for AHK v2.

The perspective of my argument about this, is it being relative to the existing help (editors, ebooks, videos, libraries, answered help questions...). I do think AHK v2 will reach that tipping point, but there is so much AHK v1.1 stuff out there to make it more convenient to help solve issues. A lot of people from non-programming backgrounds, could use all the help they can get. When you are not of or in that "world", it looks like Mount Everest, even if experienced people or experts feel it's just another hill. As one's expertise grows, the ability to absorb new languages grows greater, and differences like between AHK v1 to AHK v2 becomes smaller.

AHK_user
Posts: 515
Joined: 04 Dec 2015, 14:52
Location: Belgium

Re: AHK Versions

Post by AHK_user » 27 Aug 2022, 05:36

AHK all the way is also an excellent V2 tutorial source.
Not that many tutorials, but the existing ones are very well made, educational and straigth to the point.

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: AHK Versions

Post by gregster » 27 Aug 2022, 09:22

Ben the Coder wrote:
22 Aug 2022, 19:43
What do you mean,
use both versions
:?:
Why limit yourself to one version? Start small with AHK v2 scripts, if you are still feeling more comfortable with v1, or if you don't find the resources you need.
It is still allowed to use v1 as well, if you start with v2. No need to translate your 20000 lines v1 script to v2.

Ben the Coder

Re: AHK Versions

Post by Ben the Coder » 27 Aug 2022, 09:26

gregster wrote:
27 Aug 2022, 09:22
Ben the Coder wrote:
22 Aug 2022, 19:43
What do you mean,
use both versions
:?:
Why limit yourself to one version? Start small with AHK v2 scripts, if you are still feeling more comfortable with v1, or if you don't find the resources you need.
It is still allowed to use v1 as well, if you start with v2. No need to translate your 20000 lines v1 script to v2.
Oh that's great!
I didn't know that you could use both versions simultaneously. That was one of the things I wasn't keen about.
Thanks! :)

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

Re: AHK Versions

Post by boiler » 27 Aug 2022, 09:51

I can understand the comments regard GUIs especially. To someone new to coding, understanding and using objects is something that can take some time, if they even try to learn them at all. In v1, you don't have to touch objects and can start creating GUIs right away. In v2, understanding objects is now in the direct path of the learning curve to be able to add working GUIs to their scripts. It might not seem like a big deal to experienced programmers, but to people new to coding (whom v1 was friendly towards), it could be enough to decide it's not for them.

Ben the Coder

Re: AHK Versions

Post by Ben the Coder » 27 Aug 2022, 11:52

boiler wrote:
27 Aug 2022, 09:51
I can understand the comments regard GUIs especially. To someone new to coding, understanding and using objects is something that can take some time, if they even try to learn them at all. In v1, you don't have to touch objects and can start creating GUIs right away. In v2, understanding objects is now in the direct path of the learning curve to be able to add working GUIs to their scripts. It might not seem like a big deal to experienced programmers, but to people new to coding (whom v1 was friendly towards), it could be enough to decide it's not for them.
Thanks! Yeah, I'm pretty new to AHK, as you can see in my profile (joined 08 May 2022, 10:06).

Ben the Coder

Re: AHK Versions

Post by Ben the Coder » 27 Aug 2022, 11:56

It's hard to switch programming languages, but (I find) harder to switch between versions of specific programming languages:
  • You just start a new libary of code and start programming
  • You have to convert all your code to the new format

lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: AHK Versions

Post by lexikos » 27 Aug 2022, 19:00

boiler wrote:
27 Aug 2022, 09:51
In v1, you don't have to touch objects and can start creating GUIs right away. In v2, understanding objects is now in the direct path of the learning curve to be able to add working GUIs to their scripts.
Beginners use hotkeys, commands and even expressions while only understanding a fraction of the underlying concepts. Why are objects different? It's just a matter of using slightly different patterns, like preceding the "sub-command" with the name of the GUI (variable).

I can believe that learning about objects in abstract could be difficult, as explanation of the concepts can be dry and impractical. But learning how to create a GUI, or use an array, or whatever else learned by example, shouldn't be any more difficult with objects than it was with commands that have inconsistently mixed syntax.

For instance (example taken from the documentation):

Code: Select all

MyGui := Gui()
MyGui.Add("Text",, "Please enter your name:")
MyGui.AddEdit("vName")
MyGui.Show
Why do I need to know that there's an object here? I create a GUI which I name MyGui, add controls to MyGui and show it.

fincs tried to keep it almost 1:1 with the old GUI commands. Although my replacing g-labels with OnEvent is a bit of a departure from that, I don't believe g-labels are easier to understand or use, especially for controls with multiple events.

I think the biggest barriers to learning are self-imposed, or a matter of perception.

Post Reply

Return to “General Discussion”