Page 1 of 1

Highlight specialtext in different color possible ?

Posted: 17 Apr 2013 10:27
by micha_he
I would like to highlight specific text in a different color.

Autoit local functions [_abc(x,...) or _xyz_2(x,y,...)] be displayed as normal text in AutIt syntax file.

Can i define a RegEx or similar for a keyword-group ? The functionnames begin often with a '_', end before next delimiter like '(', space etc. and may not be included in other keyword-groups (higher priority).

Thanks for help...
Micha

Re: Highlight specialtext in different color possible ?

Posted: 18 Apr 2013 11:30
by Rickard Johansson
Yes! Maybe something like this (not tested...)

[Keywords]
#Function names=_[0-9a-fA-F_]+
...

Re: Highlight specialtext in different color possible ?

Posted: 23 Apr 2013 10:48
by micha_he
I have test with "#Own functions=\b_[0-9a-zA-Z_]+" and shorter with "#Own functions=\b_[\w]+".
But the highlighter sometimes mark only a part like here:
HighlighterTest.jpg
HighlighterTest.jpg (27.67 KiB) Viewed 19300 times
Where's my mistake ?

Re: Highlight specialtext in different color possible ?

Posted: 25 Apr 2013 09:16
by micha_he
The length of the marked funktionname (black, underline in Example), depends on how many characters left of the ' = '-delimiter.

A bug or my mistake ??? It seems, that '\b' (begin of word) not fully working !

In other RegEx-Tester it works.

Re: Highlight specialtext in different color possible ?

Posted: 07 May 2013 14:36
by micha_he
Hi Rickard. Can you comment this conspicuity ?

Thanks
Micha

Re: Highlight specialtext in different color possible ?

Posted: 08 May 2013 12:17
by Rickard Johansson
It's a bug and it's been fixed in v8.62. Thanks!