Setting a control panel option

    You may find you need to change the color depth of your monitor to use some software. You can change this setting using the Monitors control panel or the Color Depth module on the Control Strip. You can also use AppleScript.

    The Scripting Additions folder (in the System Folder) includes a MonitorDepth scripting addition that defines terms you can use to set the color depth of your monitor.

    To see the terms you can use, open the dictionary for the MonitorDepth scripting addition.

    Open the MonitorDepth dictionary for me.

    You'll see these terms defined in the System Object Suite:
    monitor depth: the current monitor depth setting
    max monitor depth: the maximum monitor depth setting
    min monitor depth: the minimum monitor depth setting
    set monitor depth: sets the monitor depth setting

    You can use these terms to write a simple script that sets the monitor depth to the maximum allowed by your monitor:

    set monitorMaxDepth to max monitor depth
    set monitor depth monitorMaxDepth

    The following example displays a dialog box that lets you select the monitor depth you want:

    Show me the monitor depth example.

    Note that neither of these examples uses a Tell statement. Because scripting additions are always available, you don't have to direct the commands to a specific application.

 


Table of contents