Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect other v1 invalid syntax #112

Open
mmikeww opened this issue Jul 17, 2023 · 2 comments
Open

Detect other v1 invalid syntax #112

mmikeww opened this issue Jul 17, 2023 · 2 comments

Comments

@mmikeww
Copy link
Owner

mmikeww commented Jul 17, 2023

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

@Lexikos
Copy link

Lexikos commented Jul 22, 2023

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.

@mmikeww
Copy link
Owner Author

mmikeww commented Jul 22, 2023

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants