Syntax Check Utility

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
paulobuchsbaum
Posts: 13
Joined: 27 Feb 2016, 22:14

Syntax Check Utility

03 Mar 2016, 22:17

I've made a small executable utility in Lazarus, a free Delphi clone, to check some syntax issues:

It is a small GUI application that lets you interactively select the name of a .ahk file, which can be stored wholly or partly in an .ini file. It generates all messages at once, allowing them to save in the Clipboard.

1) It shows lines using "=" for assignment instead of ": =". AHK accept both, but I use just ":=" for assignment.
2) It shows lines using "IF" command without parentheses limiting the whole expression, even though in some cases the AHK allows.
3) It shows lines using where the programmer uses a command on the same line than "IF". AHK does not accept it, but it does not show the error.
4) It shows lines with "LOOP" command that is not followed by digit, "%" or '{'. It not accepts ","

If anyone is interested, Let me know.
paulobuchsbaum
Posts: 13
Joined: 27 Feb 2016, 22:14

Re: Syntax Check Utility

06 Mar 2016, 09:57

I've made a new version of this small utility, scanning commands such as IF, WHILE, LOOP and FOR; searching for block evidence (2 first lines after flow control command with the same indentation), but without using braces ({}).

This is not detected, but from the second line forward, it will run, but not linked with that flow control command.

TAB size can be set in the INI file.
naeSignedIn

Re: Syntax Check Utility

24 Apr 2016, 00:44

This utility sounds great -- is it available for download anywhere?
obchhris

Re: Syntax Check Utility

21 May 2016, 22:57

paulobuchsbaum, Thanks very much for making your script checking tool available. I've come back to AHK after not having the need for it for a few years and your utility will be helpful without a doubt. Great job..
jamieh
Posts: 1
Joined: 08 Dec 2023, 09:17

Re: Syntax Check Utility

08 Dec 2023, 09:21

I presume this is for V1. I’m on a Mac and would love to be able to check AHK scripts before testing on a PC at another site. Is the source available so I could build a MacOS version?
geek
Posts: 1052
Joined: 02 Oct 2013, 22:13
Location: GeekDude
Contact:

Re: Syntax Check Utility

19 Dec 2023, 07:26

jamieh wrote:
08 Dec 2023, 09:21
I presume this is for V1. I’m on a Mac and would love to be able to check AHK scripts before testing on a PC at another site. Is the source available so I could build a MacOS version?
AutoHotkey should run on MacOS via Wine, at least well enough to validate the syntax of a script. Other than that, I run a hosted version of AHK+Wine that you can access on the Wiki https://autohotkey.wiki/cloudahk which should be able to tell you if your script has syntax errors.

Return to “Other Utilities & Resources”

Who is online

Users browsing this forum: No registered users and 60 guests