Name
Appearance Control Panel
Syntax
tell app "Appearance" to get picture file of monitor 1 (* returns "no picture" if the desktop has a color but not a picture *)
Dictionary commands
- count
This command returns an integer representing a count of certain Appearance objects, such as:
count of monitors
or:
count of themes
You can also use the syntax
count each themeorcount each monitor.- exists
This indicates whether an object exists and returns a
booleanvalue, as in:exists monitor 2
This command returns
falseif the machine is hooked up to only one monitor.- quit
This quits the Appearance application:
tell app "Appearance" to quit
- run
This command sends a run Apple event to Appearance, which opens the application if it is not already open. Using this command is not necessary as AppleScript sends an implicit run command to the applications that are targeted in a
tellstatement. Chapter 7 , describes thetellstatement.
Dictionary classes
-
Application The Appearance
Applicationclass has two elements:themeandmonitor. There are in reality about two dozen theme objects associated with each Appearance application and one or more monitors (depending on how many monitors are attached to your machine). TheApplicationclass has the following properties (appearing here in their Dictionary order), all of which are accessible by targeting the Appearance app in atellstatement. The properties are accompanied by their data type in parentheses:-
name(string) This represents the application’s ...
-
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access