resolved: new syntax files... ugh!!

Ask how to do things or if a certain feature is available in the program.
Post Reply
User avatar
DerellLicht1
Posts: 136
Joined: 23 Jul 2021 17:38
Location: Fremont, CA, USA

resolved: new syntax files... ugh!!

Post by DerellLicht1 »

Hi @pjj ; Could you help me again, I'm confused...
I want to add syntax highlighting support for AutoIt files (.au3) ...
So went to Environment -> Addons -> Highlighters ...
There is already an option for AutoIt3, so I enabled that... I then added .au3 files to the file-extension list...

I then closed/re-opened RJTE, but I still don't have syntax highlighting for my .au3 file...
I also closed the program, then copied @micha_he's AutoIt syx file from this thread:
viewtopic.php?t=2974
to C:\Users\dan7m\AppData\Roaming\RJ TextEd/Syntax ...

I now have the following AutoIt files in the RJTE files:
06/30/23 13:08:02 C:\Users\dan7m\AppData\Roaming\RJ TextEd/Syntax/AutoIt.ini
03/11/22 12:42:09 C:\Users\dan7m\AppData\Roaming\RJ TextEd/Syntax/AutoIt.syx
01/14/15 09:27:00 C:\Users\dan7m\AppData\Roaming\RJ TextEd/Syntax color themes/SciTE4AutoIt V1.xml

But I *still* don't get AutoIt syntax highlighting ...

What am I missing??
Last edited by DerellLicht1 on 29 Nov 2023 15:47, edited 1 time in total.
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: new syntax files... ugh!!

Post by micha_he »

I have no idea, it should actually work out of the box.
User avatar
pjj
Posts: 2108
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: new syntax files... ugh!!

Post by pjj »

micha_he wrote: 29 Nov 2023 07:43 I have no idea, it should actually work out of the box.
Seconded :?

Now, I want some questions, now!

Image

Thank you, yes, answers.

Do you use the newest version of our beloved editor? There was a tiny glitch with regard to recognizing highlighters, fixed in 16.01.

Do you have Options > File > Save status for last open files > Save highlighter checked? If so, please uncheck it and find out if it have helped.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
DerellLicht1
Posts: 136
Joined: 23 Jul 2021 17:38
Location: Fremont, CA, USA

Re: new syntax files... ugh!!

Post by DerellLicht1 »

Aye, I'm using V16.01...

And actually, this syntax file *is* working... sometimes...

I closed and re-opened the wfas.au3, and it came up using the proper syntax!

I then opened another .au3 and it did *not* use it, but then I closed and re-opened *that* file, and it now is working!!

That gave me the idea that it was just failing on the first open for each .au3 file, but I opened a *third* file, and it's working fine on first try...
So I don't know what is going on, but for now, the AutoIt highlighting seems to be working fine... heh...

@pjj: I *do* have Save highlighter checked... but since it is working now, I'm not sure if I should mess with it??
In any case, what is the significance of that option?? Even if it's turned off, when I re-open the file, the editor will use the appropriate syntax hiliting anyway, won't it??
User avatar
DerellLicht1
Posts: 136
Joined: 23 Jul 2021 17:38
Location: Fremont, CA, USA

Re: new syntax files... ugh!!

Post by DerellLicht1 »

micha_he wrote: 29 Nov 2023 07:43 I have no idea, it should actually work out of the box.
Hi, micha_he !! I'm surprised to see you still around; your previous thread is almost a decade old...

Anyway, I *do* have a possible, *very* minor, bug in your AutoIt syntax file...
In block comments, #ce is "end of block", but it is *still* a comment line, so the entire line *should* be in the Comment color, but it is not...
The #ce is comment color, but the rest of the line is not... see included image.
Is that something that would be easily modified??
ScreenShot.jpg
ScreenShot.jpg (13.03 KiB) Viewed 2185 times
User avatar
pjj
Posts: 2108
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: new syntax files... ugh!!

Post by pjj »

DerellLicht1 wrote: 29 Nov 2023 15:40 @pjj: I *do* have Save highlighter checked... but since it is working now, I'm not sure if I should mess with it??
In any case, what is the significance of that option?? Even if it's turned off, when I re-open the file, the editor will use the appropriate syntax hiliting anyway, won't it??
The idea (as I understand it) is that when this option is set on, you can manually assign to a file a highlighter that is different than the standard (i.e. based on file extension) one, and it will be remembered; e.g. for the file named exception.txt you can assign C++ highlighter and it will be remembered and opened with this new one instead of old and boring "Text file". This new setting has been introduced recently. If you don't have such exceptions in your projects, I guess you don't need this option to be switched on.

Perhaps you have inadvertently assigned to your files the wrong highlighter (i.e. before switching on AutoIt highlighter) and subsequently they were opened with it? And your third file was opened with the correct one, because it was then already switched on, as per your first post?
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
DerellLicht1
Posts: 136
Joined: 23 Jul 2021 17:38
Location: Fremont, CA, USA

Re: new syntax files... ugh!!

Post by DerellLicht1 »

pjj wrote: 29 Nov 2023 18:10 Perhaps you have inadvertently assigned to your files the wrong highlighter (i.e. before switching on AutoIt highlighter) and subsequently they were opened with it? And your third file was opened with the correct one, because it was then already switched on, as per your first post?
Well, I didn't *explicitly* assign the files to another highlighter, but...
well, no... I was thinking maybe it picked up the highlighter for one of the other files that I had open (the others were C++), but if that had been the case, I would have had *some* kind of highlighting present, since AutoIt and C++ share some characteristics... in my case, they were just coming up as text files...

ummm... maybe they *did* have .txt set as default, since I had that flag set?? just guessing, though...
anyway, I'll turn that flag off just in case - I don't think I've *ever* wanted that...
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: new syntax files... ugh!!

Post by micha_he »

DerellLicht1 wrote: 29 Nov 2023 15:52 Anyway, I *do* have a possible, *very* minor, bug in your AutoIt syntax file...
In block comments, #ce is "end of block", but it is *still* a comment line, so the entire line *should* be in the Comment color, but it is not...
The #ce is comment color, but the rest of the line is not... see included image.
Is that something that would be easily modified??
Maybe Rickard have an idea, what needs to be changed in the syntaxfile, that this works.

It seems, that this behavior is the same for all block-comments, even in other syntax-files.
User avatar
Rickard Johansson
Site Admin
Posts: 6562
Joined: 19 Jul 2006 14:29

Re: resolved: new syntax files... ugh!!

Post by Rickard Johansson »

Fixed in the next release (v16.02). Thanks!
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: resolved: new syntax files... ugh!!

Post by micha_he »

The change (in V16.02 and newer, tested with actual V16.11) with the AutoIt #ce-line not fully work !
It works only, if #ce is followed by a space.

Otherwise, the entire remaining source code is seen/marked as a comment.
Last edited by micha_he on 02 Feb 2024 09:08, edited 1 time in total.
User avatar
Rickard Johansson
Site Admin
Posts: 6562
Joined: 19 Jul 2006 14:29

Re: resolved: new syntax files... ugh!!

Post by Rickard Johansson »

Fixed in next release (v16.12). Thanks!
Post Reply