Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

highlight keyword colors

Status
Not open for further replies.

billwoo1

Technical User
Sep 21, 2006
7
US
I have data that constantly scrolls across my screen. I would like certain keywords to be more pronounced by changing its color. I found this script but cant get it to work. It looks like its made to hilight the words in 5 different keyword lists with different colors.Was this written for procomm aspect. My version is 4.8
---------------------------------------------------------------------

//////////////////////////////////////////////////////////////////////////////
//
// Aspect highlighter written by Steve Arnold
//
//////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
// language name

Language: Procomm Plus Aspect Script

//////////////////////////////////////////////////////////////////////////////
// put whatever you want here, short description, author name, email address..

Description: Aspect script for Procomm Plus, Steve Arnold

//////////////////////////////////////////////////////////////////////////////
// default file filter
// note: if more than one extension is associated, eg:
// C/C++ files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp

Filter: Aspect files (*.was)|*.was


//////////////////////////////////////////////////////////////////////////////
// help file which will be invoked when F1 is pressed

HelpFile: "C:\Program Files\Symantec\Procomm Plus\PROGRAMS\ASPECT.HLP"


//////////////////////////////////////////////////////////////////////////////
// language case sensitivity
// 0 - no
// 1 - yes

CaseSensitive: 0


//////////////////////////////////////////////////////////////////////////////
// comment type: LineComment - comment to the EOL
// BlockCommentBeg - block comment begin, it could be
// multiline
// BlockCommentEnd - block comment end
//
// if there is more than one definition of line/beg/end comment string,
// you can separate it with spaces.
// for example, for pascal it would be:
// LineComment: //
// BlockCommentBeg: (* {
// BlockCommentEnd: *) }

LineComment: ;
BlockCommentBeg:
BlockCommentEnd:


//////////////////////////////////////////////////////////////////////////////
// identifier characters
// note: characters shouldn't be delimited, except arrays
// array of chars could be defined as from_char..to_char

IdentifierBegChars: a..z A..Z _%@.
IdentifierChars: a..z A..Z _ 0..9 ?

//////////////////////////////////////////////////////////////////////////////
// numeric constants begin characters
// note: characters shouldn't be delimited, except arrays
// array of chars could be defined as from_char..to_char
// number always starts with 0..9 except when NumConstBeg
// defines other

NumConstBegChars: 0..9


//////////////////////////////////////////////////////////////////////////////
// numeric constants characters
// note: characters shouldn't be delimited, except arrays
// array of chars could be defined as from_char..to_char
// number always starts with 0..9 except when NumConstBeg
// defines other

NumConstChars: 0..9 abcdefhABCDEFH


//////////////////////////////////////////////////////////////////////////////
// escape character

EscapeChar:


//////////////////////////////////////////////////////////////////////////////
// keyword table
// note: delimited with spaces, lines could be wrapped
// you may divide keywords into five groups which can be
// highlighted differently

// ASPECT keywords

KeyWords1: 1KXMODEM 1KXMODEMG 2KWINDOW 4KWINDOW ABORTDNLD
// System variables

KeyWords2: SUCCESS FAILURE $ACTIONBAR $ACTIONBARS $ACTIVEWIN


// Predefined global variables

KeyWords3: f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 i0
// Predefined macro definitions

KeyWords4: ASPDEBUG ASPFILE ASPLINE ASPVERSION

// Preprocessor keywords

KeyWords5:

//////////////////////////////////////////////////////////////////////////////
// string delimiter: StringBegChar - string begin char
// StringEndChar - string end char
// MultilineStrings - enables multiline strings, as perl
// has it

StringBegChar: "
StringEndChar: "
MultilineStrings: 0


//////////////////////////////////////////////////////////////////////////////
// use preprocessor: 0 - no
// 1 - yes
// note: if yes, '#' and statements after it will be
// highlighted with Preprocessor defined colors

UsePreprocessor: 1


//////////////////////////////////////////////////////////////////////////////
// highlight line: 0 - no
// 1 - yes
// note: if yes, current line will be highlighted

CurrLineHighlighted: 0


//////////////////////////////////////////////////////////////////////////////
// colors
// note: first value is foreground, second is background color
// and third (optional) represents font attribute:
// B - bold
// I - italic
// U - underline
// S - strike out
// attributes can be combined: eg. B or BI
// as value, it could be used any standard windows color:
// clBlack, clMaroon, clGreen, clOlive, clNavy,
// clPurple, clTeal, clGray, clSilver, clRed, clLime,
// clYellow, clBlue, clFuchsia, clAqua, clLtGray,
// clDkGray, clWhite, clScrollBar, clBackground,
// clActiveCaption, clInactiveCaption, clMenu, clWindow,
// clWindowFrame, clMenuText, clWindowText, clCaptionText,
// clActiveBorder, clInactiveBorder, clAppWorkSpace,
// clHighlight, clHighlightText, clBtnFace, clBtnShadow,
// clGrayText, clBtnText, clInactiveCaptionText,
// clBtnHighlight, cl3DDkShadow, cl3DLight, clInfoText,
// clInfoBk
// as value, it could be used hex numeric constant too:
// $BBGGRR - BB: blue, GG: green, RR: red, eg: $FF6A00

SpaceCol: clWindowText clWindow
Keyword1Col: clNavy clWindow B
Keyword2Col: clPurple clWindow
Keyword3Col: clBlue clWindow
Keyword4Col: clBlue clWindow
Keyword5Col: clBlue clWindow
IdentifierCol: clWindowText clWindow
CommentCol: clGray clWindow
NumberCol: clRed clWindow
StringCol: clMaroon clWindow
SymbolCol: clGray clWindow
PreprocessorCol: clBlue clWindow BI
SelectionCol: clWhite clNavy
CurrentLineCol: clBlack clYellow

OverrideTxtFgColor: 0
BlockAutoindent: 0
BlockBegStr:
BlockEndStr:
MatchedBracesCol: clWindowText clWindow

 
Actually that appears to be for use in a code editor that would let different ASPECT keywords be highlighted in different colors (I have a few such wordlists for a couple different editors on my site).

Do you have any control over the output from the remote system? If so, you could use escape codes to send the appropriate color code to have the text appear in the desired color. You would need to make sure you were using the proper escape sequences for the terminal emulation required for that system and this would also affect anyone else connecting to that system, so it may not be the ideal solution.

There may be a way to do this with multiple when target commands (one for each string you are interested in highlighting) and by inserting the escape sequences mentioned above in the proper part of the data stream. That would also require reading the incoming data line by line, parsing it for the strings, and then displaying that in Procomm, so it may not flow as smoothly as before.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top