Product, version and build: PrimalScript 2016 - Version 7.2.94
64 bit version of product
Operating system: 64bit , Windows 10
I am working on some rather large batch scripts. The default settings of PrimalScript is to have every part of the known syntax to be dark blue.
This can, when the scripts are getting large be rather annoying. Since every line has a dos batch syntax, almost all lines will start with dark blue color.
How can i change keywords aka setlocal - endlocal - f:functions goto:eof etc with my custom colors ?
The only thing i have found is in options - Text Editor - Colors - Batch/CMD Keywords , however this only let me change colors for all keywords to another color.
I have tried to browse the support pages and google, however i could not find anything on this.
and btw I cannot get the help function inside Options to work. nothing happens when i click it so could not find anything helpfull there either.
..
Custom Colors for script syntax
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Custom Colors for script syntax
You can put a file called CMD.EXT in the PrimalScript installation folder. List one keyword per line.
These keywords show up with the "Custom keyword" color.
I am not certain at the moment if that will let you override existing keywords.
These keywords show up with the "Custom keyword" color.
I am not certain at the moment if that will let you override existing keywords.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Custom Colors for script syntax
Thank you Alexander
This does however as you say only create the already blue color on the extra codewords i put in, but do not seem to give me the possibility to set up custom colors for the syntax and so it does not add to readabiliity of the scripts.
i love the sapien Products, however my opinion is that this is a downside to an otherwise excellent Product, if customization of codeword colors is not possible. After all this is offered by most of the free Products in the market like notepad++. I am surprised if it is not a feature I actually expected it
aka: code ; foregroundcolor ; backgroundcolor
something like
echo;blue; white
set;red;white
:main;Orange;yellow
This does however as you say only create the already blue color on the extra codewords i put in, but do not seem to give me the possibility to set up custom colors for the syntax and so it does not add to readabiliity of the scripts.
i love the sapien Products, however my opinion is that this is a downside to an otherwise excellent Product, if customization of codeword colors is not possible. After all this is offered by most of the free Products in the market like notepad++. I am surprised if it is not a feature I actually expected it
aka: code ; foregroundcolor ; backgroundcolor
something like
echo;blue; white
set;red;white
:main;Orange;yellow
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Custom Colors for script syntax
You can of course change the color of batch keywords as well as that of custom keywords in the color settings dialog.
If you cannot find that I'd be happy to post a screenshot.
Syntax coloring is a visual aid while reading code to distinguish different classes of text from one another. Code, comments, strings etc.
It also serves as a visual indicator while typing code. Once you press space (or any other terminating character) a keyword will change color
while a misspelled word will not. To what actual color it changes is not really relevant for this as long as it is sufficiently different
from normal, non-command text.
In more complex languages there may be more than one class of keywords, but batch files have a rather small keyword set.
Customization to allow each keyword having a different color and even a different background would actually completely negate the
advantages of syntax coloring. If your script looks like all colors of the rainbow it would be very hard to distinguish what is what.
But of course everyone has a different taste
If you cannot find that I'd be happy to post a screenshot.
Syntax coloring is a visual aid while reading code to distinguish different classes of text from one another. Code, comments, strings etc.
It also serves as a visual indicator while typing code. Once you press space (or any other terminating character) a keyword will change color
while a misspelled word will not. To what actual color it changes is not really relevant for this as long as it is sufficiently different
from normal, non-command text.
In more complex languages there may be more than one class of keywords, but batch files have a rather small keyword set.
Customization to allow each keyword having a different color and even a different background would actually completely negate the
advantages of syntax coloring. If your script looks like all colors of the rainbow it would be very hard to distinguish what is what.
But of course everyone has a different taste
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.