ControlPlane Icon

AppleScript with ControlPlane

This page gives examples how to use AppleScript with ControlPlane.

The following script will get the current context from ControlPlane:

  1. Use Script Editor to create an AppleScript such as:
                                tell application "ControlPlane"
                                    get current context
                                end tell
                            

To force ControlPlane to change to a different context using the following script:

  1. Use Script Editor to create an AppleScript with the following:
                                tell application "ControlPlane"
                                    set current context to "<Context Name>"
                                end tell
                            
    Where <Context Name> is the name of a context you have created.

The following script will report if the "Sticky" option is set in ControlPlane:

  1. Use Script Editor to create an AppleScript with the following:
                                tell application "ControlPlane"
                                    get sticky
                                end tell
                            

The following script will set the "Sticky" option:

  1. Use Script Editor to create an AppleScript with the following:
                                tell application "Controls
                                    set sticky to true
                                end tell
                            

See also

Setting up ControlPlane's actions