Changing Colors for Syntax Highlighting in the Script Editors

InstallShield 2014

InstallShield lets you change the colors that are used to differentiate among different script elements in the script editor in various views (for example, the InstallScript view and the SQL Scripts view). You can change the foreground color (the color that is used for the text), as well as the background color, for script elements such as comments, functions, and strings.

This functionality—called syntax highlighting—helps to improve the readability and context of code. In addition, it can help you avoid errors caused, for example, when you attempt to use a reserved word as a user-defined identifier. It can also help you locate other errors in your script, such as misspelled keywords, missing quotation marks at the end of a string, and missing comment characters.

Tip: Note that the script editor properties are global per-user settings that affect all InstallShield script editors. For example, the same syntax coloring settings are used for all script editors. If you change the settings in the SQL Scripts view, the settings are also changed in the InstallScript view the next time that the InstallScript is reloaded in that view.

To change the syntax highlighting that is used in the script editors:

1. Right-click in the script editor pane and click Properties. The Script Editor Properties dialog box opens.
2. In the Colors area, click the setting for the script element that you want to configure. InstallShield displays foreground and background buttons in the setting.
3. Do one of the following:
Click the foreground button or the background button. The Colors dialog box opens, enabling you to select the color that you want to use.
Enter the RGB values for the color that you want to use for the foreground or the background. For example, the entry 0; 0; 0 / 255; 255; 255 indicates that InstallShield should use black (which has an RGB value of 0; 0; 0) for the foreground and white (255; 255; 255) for the background. If you do not want to set a color for a particular area, you can use dashes (-;-;-).
4. Click OK. The Script Editor Properties dialog box closes.

If script highlighting is enabled, InstallShield changes the colors that are used to display text in the script editor as needed. To learn more, see Enabling or Disabling Syntax Highlighting in the Script Editors.

To make the best use of this functionality, note the following:

Misspelled reserved words are not recognized by the editor and are not displayed with syntax coloring. If you see in your script a “reserved word” that is not displayed with indicating attributes, it is possible that it is misspelled.
Coloring of string literals includes both the opening and closing quotation marks. If the closing quotation mark is missing, string coloring will extend to the end of the line; in that case, text that should have followed the quotation will be displayed as though it were part of the string literal.
Syntax coloring makes it easy to identify comments that open with /* and are not closed properly with */. In that case, all of the text that follows the comment is displayed with the comment color attribute.
In lines that include comments starting with two slashes (//), all text from the comment character to the end of the line is recognized as a comment.
In the script editor that is displayed in the InstallScript view, InstallShield does not use syntax coloring for files that have an extension other than .rul or .h (for example, log or report files).

See Also