

Pretty much everything has moved to functions now, so labels are now gone. I'd say one of the biggest changes is with GUI's and controls. If anyone *does* want to update their scripts to AHK v2, my converter script will make this pretty easy, and my backport functions (AHK v2 functions for AHK v1), mean you will still be able to use those fully/partially converted scripts on AHK v1.ĪHK v1 to AHK v2 converter - AutoHotkey Community This typically requires the use of 'local' in functions, and giving variables a value (e.g. I would advise any serious AHK developers to use #Warn in all their scripts, AHK v1 or AHK v2. (And possibly: ControlGetList ('ControlGetItems')/WinGetControls/WinGetControlsHwnd.) DateAdd/DateDiff, DirExist, WinGetList. Some AHK v2 (custom backport) functions I would consider using in AHK v1 (for convenience, and to reduce the future conversion burden): Note: you can automate conversion for most things (the one key exception is GUIs).Ĭommands as functions (AHK v2 functions for AHK v1) - AutoHotkey Community Whereas if you keep your code as AHK v1, you can convert it in one go at a later date. Note: if you convert your code to AHK v2 too early, you may need to make further adjustments to the AHK v2 code as AHK v2 changes. An advantage of using AHK v1 is that more libraries are available.


'var := value', not 'var = value', and avoid using any functionality marked in the documentation as 'deprecated'. Use more forwards compatible AHK v1 code where possible. I would use AHK v1, unless the script makes heavy use of GUIs, in which case I would consider using AHK v2 now.
