Jump to content

Does anyone know how to customize the scite output color scheme?


ivan
 Share

Recommended Posts

Hi!

I'm working on a simple script that generates some data I visualize on the Scite console. For ease I prefix output with the "!", "+", "-", ">" such that I can find exceptions at a glance. I have seen that whenever I use @tab to tabulate data the output appears in pink, and occasionally, on some unknown circumstances (to me) the output is brown. I looked at the scite help file to see if I could customize text color directives for the console, but I got lost in the lua docs.

I wrote the following script which displays colored lines for the standard chrs ("!", "+", "-", ">" ) in the hope I will discover an additional one.

Local $lsFormat = "%-10s %-10s "
ConsoleWrite(StringFormat($lsFormat, "CHR", "ASC") & @CRLF)
For $i=32 To 127 Step 1
    ConsoleWrite(StringFormat($lsFormat, Chr($i), $i) & @CRLF)
Next

I'd appreciate it if anyone can shed some light on this mystery.

Ivan

Link to comment
Share on other sites

  • Moderators

ivan,

As far as I know these are the only coloured SciTE console lines: :)

ConsoleWrite('! = Bold Red' & @LF)
ConsoleWrite('> = Blue' & @LF)
ConsoleWrite('- = Orange' & @LF)
ConsoleWrite('+ = Green' & @LF)
ConsoleWrite('(5) : = Red (jump to line 5 when double-clicked)' & @LF)
ConsoleWrite('Start with String or Integer then ' & @TAB & '6' & ' = Pink (jump to line 6 when double-clicked)' & @LF)


ConsoleWrite('(' & @ScriptLineNumber & ') : = Red (jump to line ' & @ScriptLineNumber & ' when double-clicked)' & @CRLF)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

As Melbe23 mentions but a little bit more info on the specials that also facilitate jumping to a line when double clicked:

ConsoleWrite('! = Red' & @LF)
ConsoleWrite('> = Blue' & @LF)
ConsoleWrite('- = Orange' & @LF)
ConsoleWrite('+ = Green' & @LF)
ConsoleWrite('(5) : = Red (jump to line 5 when double-clicked)' & @LF)
ConsoleWrite('Start with String or Integer then ' & @TAB & @ScriptLineNumber & ' = Pink (jump to line ' & @ScriptLineNumber & ' when double-clicked)' & @LF)

;// SciTE Output logic will look for one of the following formats:
;// GCC: <filename>:<line>:<message>
;// Microsoft: <filename>(<line>) :<message>
;// Common: <filename>(<line>): warning|error|note|remark|catastrophic|fatal
;// Common: <filename>(<line>) warning|error|note|remark|catastrophic|fatal
;// Microsoft: <filename>(<line>,<column>)<message>
;// CTags: \t<message>
;// Lua 5 traceback: \t<filename>:<line>:<message>
;// Lua 5.1: <exe>: <filename>:<line>:<message>
ConsoleWrite('(' & @ScriptLineNumber & ') : = Red (jump to line ' & @ScriptLineNumber & ' when double-clicked)' & @CRLF)

So, how did you get brown?

jos :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

Jos,

I get a "Bold Red" with a leading "!" and the "Jump to" lines come out a very brownish red on my display - I assumed that was what was happening. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

... lines come out a very brownish red on my display - I assumed that was what was happening. :)

M23

As my wife would say: You men are all color-blind . ;)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

... lines come out a very brownish red on my display - I assumed that was what was happening. ;)

M23

I see them as red. Must be something on your side.

Edit: If you hold ctrl+ scroll your mouse wheel up (to zoom in) is it still brown? :)

Edited by AdmiralAlkex
Link to comment
Share on other sites

  • Moderators

AdmiralAlkex,

No, it is the same red when you expand the characters. It just looks browner on my display on the thin normal font compared to the fat bold red font given by the !. :)

Jos,

I have heard that a few times as well! ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

As Melbe23 mentions but a little bit more info on the specials that also facilitate jumping to a line when double clicked:

ConsoleWrite('! = Red' & @LF)
ConsoleWrite('> = Blue' & @LF)
ConsoleWrite('- = Orange' & @LF)
ConsoleWrite('+ = Green' & @LF)
ConsoleWrite('(5) : = Red (jump to line 5 when double-clicked)' & @LF)
ConsoleWrite('Start with String or Integer then ' & @TAB & @ScriptLineNumber & ' = Pink (jump to line ' & @ScriptLineNumber & ' when double-clicked)' & @LF)

;// SciTE Output logic will look for one of the following formats:
;// GCC: <filename>:<line>:<message>
;// Microsoft: <filename>(<line>) :<message>
;// Common: <filename>(<line>): warning|error|note|remark|catastrophic|fatal
;// Common: <filename>(<line>) warning|error|note|remark|catastrophic|fatal
;// Microsoft: <filename>(<line>,<column>)<message>
;// CTags: \t<message>
;// Lua 5 traceback: \t<filename>:<line>:<message>
;// Lua 5.1: <exe>: <filename>:<line>:<message>
ConsoleWrite('(' & @ScriptLineNumber & ') : = Red (jump to line ' & @ScriptLineNumber & ' when double-clicked)' & @CRLF)

So, how did you get brown?

jos ;)

Thx everyone, I mean it.

Sorry for not getting back, I had to leave for a couple of hours.

Honestly, I don't have the faintest clue, this was ages ago and I could have sworn I got brown, but from your specs, it just looks impossible. I don't smoke pot, so to answer your questions, there's only 2 possibilities:

1.- Long hours of work made me allucinate

2.- I'm as blind as a bat and I badly need some glasses.

:)

Again, thank you all.

IVAN

Edited by ivan
Link to comment
Share on other sites

ivan,

As far as I know these are the only coloured SciTE console lines: :)

ConsoleWrite('! = Bold Red' & @LF)
ConsoleWrite('> = Blue' & @LF)
ConsoleWrite('- = Orange' & @LF)
ConsoleWrite('+ = Green' & @LF)
ConsoleWrite('(5) : = Red (jump to line 5 when double-clicked)' & @LF)
ConsoleWrite('Start with String or Integer then ' & @TAB & '6' & ' = Pink (jump to line 6 when double-clicked)' & @LF)


ConsoleWrite('(' & @ScriptLineNumber & ') : = Red (jump to line ' & @ScriptLineNumber & ' when double-clicked)' & @CRLF)

M23

@Melba23:

And just when I thought I knew most functionalities of Scite4Autoit:

ConsoleWrite('(5) : = Red (jump to line 5 when double-clicked)' & @LF)

I never used it before, but I'm sure I'll be using it soon.

Thx,

IVAN

Edited by ivan
Link to comment
Share on other sites

  • 8 years later...
On 2/14/2011 at 3:01 PM, Melba23 said:

ivan,

As far as I know these are the only coloured SciTE console lines: :)

ConsoleWrite('! = Bold Red' & @LF)
ConsoleWrite('> = Blue' & @LF)
ConsoleWrite('- = Orange' & @LF)
ConsoleWrite('+ = Green' & @LF)
ConsoleWrite('(5) : = Red (jump to line 5 when double-clicked)' & @LF)
ConsoleWrite('Start with String or Integer then ' & @TAB & '6' & ' = Pink (jump to line 6 when double-clicked)' & @LF)


ConsoleWrite('(' & @ScriptLineNumber & ') : = Red (jump to line ' & @ScriptLineNumber & ' when double-clicked)' & @CRLF)

M23

I found one more! :)

Any line that ends with :number: will be purple and navigate to that line number when clicked on. While looking for this original post I found another by @mLipok that expands more upon this that I will add to:

; colors In SciTE are definied in   others.properties   for example like this: style.errorlist.3=fore:#FF000

ConsoleWrite('Default text' & @CRLF) ; black text color             => style.errorlist.0
ConsoleWrite('! = Red' & @CRLF)      ; ! = red bold text color      => style.errorlist.10
ConsoleWrite('> = Blue' & @CRLF)     ; > = blue text color          => style.errorlist.4
ConsoleWrite('< = Orange' & @CRLF)   ; < = orange bold text color   => style.errorlist.12
ConsoleWrite('- = Orange' & @CRLF)   ; - = orange bold text color   => style.errorlist.12
ConsoleWrite('--- = Brown' & @CRLF)  ; --- = brown text color       => style.errorlist.13
ConsoleWrite('+ = Green' & @CRLF)    ; + = green text color         => style.errorlist.11
ConsoleWrite('+++ = Brown' & @CRLF)  ; +++ = brown text color       => style.errorlist.13

; Red text color (when double-clicked jump to specified line in specified script file) => style.errorlist.3
; ConsoleWrite('FileFullPath' ( #ScriptLineNumber ) : 'AnyDescription=CallTipToPopUp')
ConsoleWrite(@ScriptFullPath & '(' & @ScriptLineNumber & ') : Description=CallTip to PopUp' & @CRLF)

; Red text color (when double-clicked jump to specified line in specified script file) => style.errorlist.3
; ConsoleWrite('Description' & ' in ' & 'FileFullPathOrFileName' & ' ( #ScriptLineNumber ) : ' & 'AnyDescription=CallTipToPopUp')
ConsoleWrite('IMPORTANT TODO in ASin.au3 on line 5 SOME Description' & @CRLF)

; Pink text color (when double-clicked jump to specified line in specified script file) => style.errorlist.9
; ConsoleWrite('Description_WithOut_Space' & @TAB & 'FileFullPathOrFileName' & @TAB & #ScriptLineNumber & 'Any other Descripion')
ConsoleWrite('DescripionForPink' & @TAB & 'ACos.au3' &  @TAB & '10' & ' = SOME Description for Pink text color' & @CRLF)

; Violet+Black text color (when double-clicked jump to specified line in specified script file) => style.errorlist.8
; ConsoleWrite(@TAB & 'FileFullPathOrFileName' & @TAB & #ScriptLineNumber & 'Any other Descripion')
ConsoleWrite(@TAB & 'ATan.au3' &  ':10:' & ' SOME Description for Violet+Black text color' & @CRLF)

; Chocolate text color => style.errorlist.5
; ConsoleWrite('Warning' & ' ' & 'Any kind of description')
ConsoleWrite('Warning ' & 'Some description for Chocolate text color' & @CRLF)

; Chocolate text color => style.errorlist.5
; ConsoleWrite('Error' & ' ' & 'Any kind of description')
ConsoleWrite('Error ' & 'Some description for Chocolate text color' & @CRLF)

; not jet checked
ConsoleWrite('In file included from SOME Description' & @CRLF) ; to check
ConsoleWrite('line 10 column 20' & @CRLF) ; to check

;Purple for trailing operator :#:
ConsoleWrite('Purple for any line ending with ":number:". Add as much space to the end as you want.                   :' & @ScriptLineNumber & ':' & @CRLF)

; Clear console output pane of SciTE after 5000 ms
Sleep(5000)
;~ ControlSend("[CLASS:SciTEWindow]", "", "Scintilla2", "+{F5}")

Edit: Actually looking closely, Mlipok already showed this with violet+black ex. Only thing I'm really showing is it does not require trailing text to add the purple color (unlike most others that are very specific)

Edited by Beege
Link to comment
Share on other sites

  • Developers
9 hours ago, Beege said:

I found one more! :)

Any line that ends with :number: will be purple and navigate to that line number when clicked on.

That is part of the output lexer where it is checking for all kinds of error/warnings of the different known compilers, check out LexErrorList.cxx for all possibilities.  ;) 

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 2 years later...

Where are these colors generated from? as in can we get the regex or whatever it uses in the source?

There seems to be changes since last post, because

; Red text color (when double-clicked jump to specified line in specified script file) => style.errorlist.3
; ConsoleWrite('FileFullPath' ( #ScriptLineNumber ) : 'AnyDescription=CallTipToPopUp')
ConsoleWrite(@ScriptFullPath & '(' & @ScriptLineNumber & ') : Description=CallTip to PopUp' & @CRLF)

shows in olive color now, not red.

Or

ConsoleWrite('Start with String or Integer then ' & @TAB & '6' & ' = Pink (jump to line 6 when double-clicked)' & @LF)

Has no color or double-click events...

 

SciTE 4.4.6

Link to comment
Share on other sites

5 minutes ago, Jos said:

Please show the full outputpane info the is generated including these messages.

image.png.fee585b96afa17fce9849a2319c959c8.png

 

This is with freshly downloaded portable SciTE, no altered settings

Edited by VAN0
Link to comment
Share on other sites

  • Developers

All those special color formats are in the LexErrorList.cxx lexer and are supposed to lex compile output formats of some different languages. You probably need to check the original code changes for that lexer to see what changed why.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

You didn't make any changes to the colors for the errors which is a list of definitions with format style.errorlist.xx=     3 is the one used for the
ConsoleWrite(@ScriptFullPath & '(' & @ScriptLineNumber & ') : Description=CallTip to PopUp' & @CRLF) 
line:

style.errorlist.3=fore:#ff8000;back:#FFFFFF

 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I didn't alter any files; this is whatever settings SciTE comes with.

It seems the default colors theme is set in properties\Embedded.properties and properties\others.properties There are 43 predefined colors (with style.errorlist.xx= )

This suggests there are 43 different text matches somewhere, not all of them applicable to output text (probably), but that's what I'm trying to find, where in the code it says "if text contains a number between two ":" use color #2, if text contains word "line" and "column" use color #19, if text starts with "In file included" use color #22 and so on

Just want to find all possible combinations that triggers color/formatting in the output. This topic discovered about 15 so far.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...