You are here: PSPad forum > English discussion forum > adding 3 KeyWord sections and 1 Variable section

adding 3 KeyWord sections and 1 Variable section

Goto Page: 1 2 3 Next

#1 adding 3 KeyWord sections and 1 Variable section

Posted by: Professor Bernd | Date: 2020-02-20 21:52 | IP: IP Logged

Hello Jan.

For AutoIt3 highlighter

Could you add 3 more Key Words sections and a section for variables?

Variables are easy to recognize: they start with a "$" sign. Example: $sLine

image

pspad:

Would it be possible to add 3 log parsers, each with its own color? That would be very friendly. smiling smiley
Thank you very much.

Best regards,
Bernd.

Options: Reply | Quote | Up ^


#2 Re: adding 3 KeyWord sections and 1 Variable section

Posted by: pspad | Date: 2020-02-21 05:16 | IP: IP Logged

Please note that PSPad general highlighter isn't for Autoit only.
Adding 3 another keywords sections will slow down highlighting.
Remove Value section will have influences of another languages.

I will try to find a way how to highlight variables without influence of anything else.

Options: Reply | Quote | Up ^


#3 Re: adding 3 KeyWord sections and 1 Variable section

Posted by: pspad | Date: 2020-02-21 05:18 | IP: IP Logged

Adding another log parsers is planned. Do you really needs another 3 log parsers?
Please note, that if any logparser fits to content, PSpad will consider the line as "error" and jump there after compilation.

Options: Reply | Quote | Up ^


#4 Re: adding 3 KeyWord sections and 1 Variable section

Posted by: pspad | Date: 2020-02-21 13:34 | IP: IP Logged

Added variable attribute with new option in User highlighter definition 'PHP style variable'

You will need to check it in user highlighter definition and remove '$' from autoit keyword chars

image

Edited 1 time(s). Last edit at 2020-02-21 13:34 by pspad.

Options: Reply | Quote | Up ^


#5 Re: adding 3 KeyWord sections and 1 Variable section

Posted by: Professor Bernd | Date: 2020-02-21 15:59 | IP: IP Logged

Thanks for responding so quickly.

I didn't think it would be so difficult. Please excuse me.

.
Log parser

pspad:
Adding another log parsers is planned. Do you really needs another 3 log parsers?

One additional log parser with its own color is fine. winking smiley

pspad:
Please note, that if any logparser fits to content, PSpad will consider the line as "error" and jump there after compilation.

The reason for a second LogParser is to highlight "Debug" messages with a different color than "Error" messages. If PSpad considers the line as "error" and jumps there after compilation, then a debug line should not look as "bad" as an error line.

Now I understand the problem, because then I also need a second function for highlighting with a different color via VBScript. yawning smiley

Example: markEditorLineA(integer)

Okay, one step at a time. smiling smiley What do you think is possible?

Options: Reply | Quote | Up ^


#6 Re: adding 3 KeyWord sections and 1 Variable section

Posted by: Professor Bernd | Date: 2020-02-21 16:27 | IP: IP Logged

General Highlighter

pspad:
Please note that PSPad general highlighter isn't for Autoit only.

Now I understand! I hadn't considered that this would affect all general highlighters. sad smiley

pspad:
Remove Value section will have influences of another languages

It is not necessary to remove the Value section because it has no effect on the AutoIt3 highlighter. (I had forgotten the influence on other languages.)

pspad:
Adding 3 another keywords sections will slow down highlighting.

Then it must be enough if variables get their own color. tongue sticking out smiley

pspad:
Added variable attribute with new option in User highlighter definition 'PHP style variable'

You will need to check it in user highlighter definition and remove '$' from autoit keyword chars

Can you tell me more details about this? When I remove '$' from autoit keyword characters, then double-clicking on a variable in the AutoIt3 script will no longer select the variable completely. yawning smiley

image

Bernd.

Edited 2 time(s). Last edit at 2020-02-21 16:37 by Professor Bernd.

Options: Reply | Quote | Up ^


#7 Re: adding 3 KeyWord sections and 1 Variable section

Posted by: pspad | Date: 2020-02-21 16:41 | IP: IP Logged

The new variable functionality will come in the next build

Options: Reply | Quote | Up ^


#8 Re: adding 3 KeyWord sections and 1 Variable section

Posted by: Professor Bernd | Date: 2020-02-21 18:27 | IP: IP Logged

Thanks a lot. smiling smiley

Bernd.

Options: Reply | Quote | Up ^


#9 Re: adding 3 KeyWord sections and 1 Variable section

Posted by: Professor Bernd | Date: 2020-03-02 01:23 | IP: IP Logged

The new PSPad version is available and contains 'PHP style variable' in the user highlighter.

To make the highlighting work I have to remove '$' from the autoit keyword chars. Also the '_' must be removed, otherwise you will get a broken highlighting (see screenshot).

image

But I cannot remove '$' and '_' from the autoit keyword char. This would prevent variable detection in all functions that use the %Word% variable, e.g. the Language Help and some of my VBScripts. Another example is when I double-click a varialbe, it is not completely marked for copying, deleting, etc.

Unfortunately I don't know a solution at the moment, but this is NOT an important feature, and you can put it on the 'Todo later' list. grinning smiley

Thank you very much for your hard work! smiling smiley

Bernd.

Options: Reply | Quote | Up ^


#10 Re: adding 3 KeyWord sections and 1 Variable section

Posted by: pspad | Date: 2020-03-02 05:37 | IP: IP Logged

Can I get any source sample with all possible variables e.t.c.?

Options: Reply | Quote | Up ^


Goto Page: 1 2 3 Next





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR