Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4    Statistic  

SyntaxColoring.AddTag

Adds a new color tag for script step, variable, function or formula coloring.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
SyntaxColoring 3.0 Yes No No No No

MBS( "SyntaxColoring.AddTag"; Selector; Text; Color )

Parameters

Parameter Description Example value
Selector What item to color with this tag. Can be ScriptStep, Function, Variable or Formula. "Formula"
Text The name of the item. Up to five words from the left name of the command. "If"
Color The color value. Can be one of a few english color names or "#123456" notation like in html. "red"

Result

Returns OK on success.

Description

Adds a new color tag for script step, variable, function or formula coloring.
Settings are saved in preferences files and you can use different settings in different FileMaker versions.
Works with FileMaker 11 and 12.

Default tags defined for script steps:
Sonstblue
Sonst,blue
Wennblue
Endeblue
Schleifeteal
Verlasseteal
Ifblue
Elseblue
End Ifblue
Loopteal
End Loopteal
Exit Loopteal
Siblue
Simonblue
Fin de siblue
Boucleteal
Fin de Boucleteal
commented formulared

Possible tag names for syntax coloring in calculations:
NameDefault
round bracket colorblue
square bracket colorpurple
curly bracket colorpurple
wrong bracket colorred
text colorteal
variable colorplum
tilde variable color-
underscore variable color-
cent variable color-
plus sign color-
minus sign color-
function color-
and sign color-
slash sign color-
star sign color-
paragraph sign color-
caret sign color-
equal sign color-
not equal sign color-
bigger sign color-
smaller sign color-
bigger equal sign color-
smaller equal sign color-
number color-
comment color-
function color-
and color-
or color-
not color-
xor color-
field color-

Some color names you can use for syntax coloring:
Black, Gray, DarkGray, LightGray, Blue, Brown, Cyan, Green, Magenta, Orange, Purple, Red, Yellow, White, alternateSelectedControlColor, alternateSelectedControlTextColor, controlBackgroundColor, controlColor, controlDarkShadowColor, controlHighlightColor, controlLightHighlightColor, controlShadowColor, controlTextColor, disabledControlTextColor, gridColor, headerColor, headerTextColor, highlightColor, keyboardFocusIndicatorColor, knobColor, scrollBarColor, secondarySelectedControlColor, selectedControlColor, selectedControlTextColor, selectedKnobColor, selectedMenuItemColor, selectedMenuItemTextColor, selectedTextBackgroundColor, selectedTextColor, shadowColor, textBackgroundColor, textColor, windowBackgroundColor, windowFrameColor, windowFrameTextColor, Cantaloupe, Honeydew, Spindrift, Sky, Lavender, Carnation, Licorice, Snow, Salmon, Banana, Flora, Ice, Orchid, Bubblegum, Lead, Mercury, Tangerine, Lime, "Sea Foam", Aqua, Grape, Strawberry, Tungsten, Silver, Maraschino, Lemon, Spring, Turquoise, Blueberry, Magenta, Iron, Magnesium, Mocha, Fern, Moss, Ocean, Eggplant, Maroon, Steel, Aluminum, Cayenne, Asparagus, Clover, Teal, Midnight, Plum, Tin and Nickel.

Examples

Enable coloring for set variable script step in German:

MBS( "SyntaxColoring.AddTag"; "ScriptStep"; "Variable setzen"; "#FF0000" )

Set blue color for round bracket:

MBS( "SyntaxColoring.AddTag"; "Formula"; "round bracket color"; "blue" )

Set green color for equal sign:

MBS( "SyntaxColoring.AddTag"; "Formula"; "equal bracket color"; "green" )

Set green color for plus sign:

MBS( "SyntaxColoring.AddTag"; "Formula"; "plus sign color"; "#00FF00" )

Enable coloring for set variable script step for missing field:

MBS( "SyntaxColoring.AddTag"; "ScriptStep"; "*<Missing Field>*"; "#FF0000" )

Color Hole() function blue in formulas:

MBS( "SyntaxColoring.AddTag"; "Function"; "Hole"; "blue" )

Color variable $$UserID blue in formulas:

MBS( "SyntaxColoring.AddTag"; "Variable"; "$$UserID"; "blue" )

Color all other functions in light red:

MBS( "SyntaxColoring.AddTag"; "Formula"; "function color"; "Salmon" )

Set comment color to gray:

MBS( "SyntaxColoring.AddTag"; "Formula"; "comment color"; "gray" )

Set color for undefined variables in script to red:

MBS( "SyntaxColoring.AddTag"; "ScriptStep"; "undefined variable color"; "red" )

Set color for tilde variable names:

MBS( "SyntaxColoring.AddTag"; "Formula"; "tilde variable color"; "green" )

Set color for underscore variable names:

MBS( "SyntaxColoring.AddTag"; "Formula"; "underscore variable color"; "red" )

Set color for cent variable names:

MBS( "SyntaxColoring.AddTag"; "Formula"; "cent variable color"; "green" )

Set color for field names:

MBS( "SyntaxColoring.AddTag"; "Formula"; "field color"; "blue" )

Set color for and:

MBS( "SyntaxColoring.AddTag"; "Formula"; "and color"; "red" )

Set comment script steps to be dark green:

MBS( "SyntaxColoring.AddTag"; "ScriptStep"; "#"; "#007700" )

Color red all values starting with comment:

MBS( "SyntaxColoring.AddTag"; "ScriptStep"; "*Value: /**"; "red" )

See also

Example Databases

Created 18th August 2014, last changed 28th April 2018


StoreRegistration   -   SyntaxColoring.CheckVariableDeclaration.Disable

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos