Get help with using AutoHotkey and its commands and hotkeys
3 posts • Page 1 of 1
I have a fairly large script that I use day-to-day, consisting of a dozen or so files and thousands of lines of code, all written in AHK1. I've heard AHK2 mentioned a few times, but never in great detail. How complicated is it to port a script from AHK1 to AHK2? What are the advantages of doing so? What can AHK2 do that AHK1 cant? Also, does Scite4AHK support 2.0?
Read AutoHotkey v2, Changes from v1.1 to v2.0.How complicated is it to port a script from AHK1 to AHK2
You need (you should) rewrite all of them from scratch (i don't recommend any "translator"), but not before reading exhaustively all the documentation and follow forum AutoHotkey v2 Development.
Well, I think there's a small improvement in performance (in addition to new features), especially in the processing of messages (events). I read in the forum a topic where there were certain issues in AHKv1 that in AHKv2 were solved regarding certain events. I do not remember the topic in question.What are the advantages of doing so? What can AHK2 do that AHK1 cant?
In addition, AHKv2 keeps you away from some bad programming practices.
I do not know, I do not use Scite4AHK, I think it had a syntax, but I doubt it was updated. I had to make my own syntax for SublimeText.Also, does Scite4AHK support 2.0?
Edit: As Helgef said, AHKv2 is much clearer, more comfortable and easier to work on long projects. The code is definitely more enjoyable.
I wouldn't recommend converting a working v1 script, unless there is still a lot of development left on the project. V2 is much easier to work with, but converting a working script will not necessarily mean the result will be (much) better. Regarding scite, see this (I didn't try it myself (yet)).