sahra
02-22-2005, 01:00 AM
Wow, SF is ... strange. Am I alone in having not realized that it lets you assign as many highlight rules to a given string as you like?
Figured out a cute application for this. You can create "highlight" tags by assigning foreground and background colors to a given (short) tag-string, and set highlightEntireLine=True, forcing the highlight to be imposed on any text output in the same line as your tag. Then you can make the tag itself go away (sorta) by defining a new highlight rule for the same string, setting foreColor=black and backColor=black.
You can then output text with ECHO, headed up with your tag-string, e.g.,
ECHO !1 <spaces> TEXT HERE <spaces>
SF sees the tag and applies the highlight rules in sequence, highlighting all the text in the line the way you want, and then hiding the tag by turning it black-on-black. Quick-and-dirty way to make pretty, multicolored menus.
Figured out a cute application for this. You can create "highlight" tags by assigning foreground and background colors to a given (short) tag-string, and set highlightEntireLine=True, forcing the highlight to be imposed on any text output in the same line as your tag. Then you can make the tag itself go away (sorta) by defining a new highlight rule for the same string, setting foreColor=black and backColor=black.
You can then output text with ECHO, headed up with your tag-string, e.g.,
ECHO !1 <spaces> TEXT HERE <spaces>
SF sees the tag and applies the highlight rules in sequence, highlighting all the text in the line the way you want, and then hiding the tag by turning it black-on-black. Quick-and-dirty way to make pretty, multicolored menus.