AutoIT - highlighting non-comment as a comment

All questions regarding lexer highlighting schemes are discussed here...
sl23
Posts: 175
Joined: 29.01.2013 10:04

Re: AutoIT - highlighting non-comment as a comment

Post by sl23 »

I can't seem to find a complete keyword reference in the manuals. I did find a list of keywords, but it isn't just those starting with a # at the start of a script, this list is a complete list of every type of keyword. so not sure it will be of use?
The ones that I know about are these:

Code: Select all

#RequireAdmin
#NoTrayIcon
#SingleInstance Force  ; this has other parameters but I can't find what they are at the moment.
#include <MsgBoxConstants.au3>
#include-once
#OnAutoItStartRegister
#pragma
The manual states this is a complete list, so I have to accept that this must be all there is.

There are also these for comments, but the point is to separate comments from preprocessors:

Code: Select all

#comments-start
#comments-end
#cs
#ce
Live for an ideal and leave no place in the mind for anything else.
main Alexey
Posts: 2597
Joined: 25.08.2021 18:15

Re: AutoIT - highlighting non-comment as a comment

Post by main Alexey »

updated the lexer, pls test.

- your list don't include #SIngleInstance so I did not add it. I searched for "autoit lang #singleinstance" and found only this page: https://www.autoitscript.com/forum/topi ... -instance/ - it tells nothing about #singleinstance?
- I added 2 #Tidy_ items, and all substrings beginning with #Au3Stripper_ (like before I added all substrings beginning with #AutoIt3Wrapper_ - not specific words list).
sl23
Posts: 175
Joined: 29.01.2013 10:04

Re: AutoIT - highlighting non-comment as a comment

Post by sl23 »

I haven't been able to find it either, and I've been searching the manual. But I used AI to add the function so likely it is not even a term! Sorry about that. Will test now. Thanks for sorting it. :)
Live for an ideal and leave no place in the mind for anything else.
sl23
Posts: 175
Joined: 29.01.2013 10:04

Re: AutoIT - highlighting non-comment as a comment

Post by sl23 »

Thanks Alexey, appreciate the fix, all seems to be good now. :)
Live for an ideal and leave no place in the mind for anything else.
main Alexey
Posts: 2597
Joined: 25.08.2021 18:15

Re: AutoIT - highlighting non-comment as a comment

Post by main Alexey »

updated again. you may be interested in this new update. now lexer knows exact word-list of preprocessor words. so it highlightes only valid directives (others have style 'id'). not all substrings beginning with #AutoIt3Wrapper_ .
sl23
Posts: 175
Joined: 29.01.2013 10:04

Re: AutoIT - highlighting non-comment as a comment

Post by sl23 »

that's great, thank you! ;)
Live for an ideal and leave no place in the mind for anything else.
Post Reply