AHK-v2-script-converter
AHK-v2-script-converter copied to clipboard
Detect other v1 invalid syntax
Lexikos recently posted on the forums a link to a script that the v2 launcher uses to determine if a script is meant for v1 or v2
Might be useful to incorporate those checks somehow
https://www.autohotkey.com/boards/viewtopic.php?f=86&t=119267
Subpattern matches that the launcher considers to be definite version cues are marked with a prefix of "v1-" or "v2-". The following sends all such cues to stdout (assuming the installation directory is default):
code := FileRead(FileSelect())
#include "C:\Program Files\AutoHotkey\UX\inc\identify_regex.ahk"
identify_regex := get_identify_regex()
p := 1
while (p := RegExMatch(code, identify_regex, &m, p)) {
p += m.Len()
if InStr(m.Mark, "-")
FileAppend m.Mark " @ " p " : " m[0] "`n", "*"
}
The link I posted was to the script which builds and tests the regex.
@Lexikos thanks for taking a look at this converter. I am not personally actively developing it, and @dmtr99 has done many of the recent changes. We have had some other contributors as well who submit PRs. If you plan on helping with it and want write access to the repo, just say the word