Name

Apple Menu Options

Syntax

tell app "Apple Menu Options"
   activate
   set recentStuff to recent items enabled (* this is an Apple Menu 
   Options property *)
end tell

Dictionary commands

quit

This command quits the control panel (i.e., it is no longer running and loaded into memory).

run

Sending the run command is the same as double-clicking the control panel or choosing it from the Apple menu Control Panels submenu.

get (reference to an object)

Use this command to get the value of a property, such as:

tell app "Apple Menu Options" to get submenus
enabled

get returns the value of the property.

as (class)

You can use the optional labeled parameter as, followed by data of type class, to specify the type of data to return (rather than the default, which is a boolean or integer for this control panel’s properties).

set (reference to an object)

Change how the Apple menu behaves by setting a value, such as:

tell app "Apple Menu Options" to set maximum recent documents to
12

This code stores up to 12 aliases to the documents that you had open recently.

to

The to labeled parameter is required; otherwise the app would not know what value the script wants to set the property to.

Dictionary classes

application

This class represents the Apple Menu Options control panel. It has the following five properties. To obtain the values of these properties, use code such as:

tell app "Apple Menu Options" to get maximum recent documents
submenus enabled (boolean)

This returns true if passing the mouse ...

Get AppleScript in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.