Depending on an end-user's Themes setting, the color of various Windows components vary from machine to machine. How, via OpenScript, can these colors be accessed?
OpenScript is a programming language within ToolBook. It is more powerful than the Actions Editor programming language, however it only works within Native ToolBook. OpenScript does not function within a Web Published lesson.
Starting with ToolBook 2004 SP3, a new function call ASYM_GetSystemColor was added to ToolBook. The function definition is below:
The name or index of a system color. Can be one of the following names:
Active window's border color
Active window's title bar color. In Windows 98, Windows 2000 and above, the left side color of an active window's title bar if the gradient effect is enabled.
Background color of multiple document interface applications
Dark shadow color for 3D display elements
Face color for 3D display elements and dialog backgrounds
Highlight color for 3D display elements
Light color for 3D display elements
Shadow color for 3D display elements
Color of text on push buttons
Right side color in the color gradient of an active window's title bar, if the gradient effect is enabled (only available in Windows 98, Windows 2000 and above)
Right side color in the color gradient of an inactive window's title bar, if the gradient effect is enabled (only available in Windows 98, Windows 2000 and above)
Color of disabled text
Color of selected items
Color of selected text
Color for hyperlink or hot-tracked item (only available in Windows 98, Windows 2000 and above)
Inactive window's border color
Inactive window's title bar color. In Windows 98, Windows 2000 and above, the left side color of an inactive window's title bar if the gradient effect is enabled.
Color of text in an inactive title bar
Color of text in tooltips
Tooltip background color
Menu background color
The background color for the menu bar when menus appear as flat menus (Menu color is still used as the background for popup menus) (only available in Windows XP and above)
The color used to highlight menu items when the menu appears as a flat menu (the highlighted menu item is outlined with Hilight color) (only available in Windows XP and above)
Color of text in menus
Scroll bar background color
Color of text in title bar and scroll bar arrows
Window background color
Window frame color
Color of text in windows
- A number can also be passed to identify the color, as specified by the Windows API documentation for GetSysColor(). Prior to Windows 98 and Windows 2000, the number can be from 0 to 25. For other versions of Windows prior to Windows XP, the number can be from 0 to 28. For Windows XP, the number can be from 0 to 30.
Returns the RGB color value of the specified Windows system color.
Created with the Personal Edition of HelpNDoc: Write eBooks for the Kindle