Page 1 of 1

Taking Commands Away Without Showing Their Replacement

Posted: 02 Jan 2018, 02:45
by SOTE
I'm starting to look at AutoHotkey v2 more, but something that I noticed is the removal of many commands, without explaining what replaces them. This can clearly create confusion. While more experienced AutoHotkey programmers might be comfortable, this might not be the case for newer and casual users.

It would be great if the help file showed what replaced the old commands in the new version.

Re: Taking Commands Away Without Showing Their Replacement

Posted: 02 Jan 2018, 03:59
by _3D_
As v2 still alpha - documentation not yet changed and not complete.
Main differences:
1. Moving to function syntax stile

Code: Select all

MsgBox Hello World ;v1
MsgBox("Hello World")
2. Removed Deref (but still you can get variable value inside string using "%variable%")
3. Process commands moved to Process<Name>() functions
4. RegExMatch return object
------------
Actually no so major changes inside v2 - but v1 and v2 become completely different.
Documentation: https://lexikos.github.io/v2/docs/AutoHotkey.htm

Re: Taking Commands Away Without Showing Their Replacement

Posted: 02 Jan 2018, 10:06
by guest3456
SOTE wrote:It would be great if the help file showed what replaced the old commands in the new version.
this doc lists the changes:
https://autohotkey.com/v2/v2-changes.htm

its on the website but not part of the help file. it probably should be part of the v2 help file

Re: Taking Commands Away Without Showing Their Replacement

Posted: 02 Jan 2018, 13:04
by jeeswg
- I wrote a conversion guide here:
AHK v1 to AHK v2 conversion tips/changes summary - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=36787
- @_3D_: Btw, in earlier versions of AHK v2 alpha:
var := "%var2%"
used to be equivalent to:
var := var2
however, now they are not equivalent, the first just gives you literal text.

Re: Taking Commands Away Without Showing Their Replacement

Posted: 03 Jan 2018, 03:45
by SOTE
jeeswg wrote:- I wrote a conversion guide here:
AHK v1 to AHK v2 conversion tips/changes summary - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=36787
- @_3D_: Btw, in earlier versions of AHK v2 alpha:
var := "%var2%"
used to be equivalent to:
var := var2
however, now they are not equivalent, the first just gives you literal text.
Jeeswg, I like this idea and checked out your post. Debatably, that is more of what is needed. A direct comparison of AHK v1 to AHK v2 that goes by each command, built-in variable, etc... changes. Of course AHK v2 isn't quite ready, but it would take the sting out of switching over or getting lost over how to do something that a person could do in AHK v1.