O'Reilly logo

AppleScript in a Nutshell by Bruce W. Perry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

FontSync Control Panel

Syntax

tell app "FontSync"
   properties -- get the control panel's properties
end tell

Dictionary commands

get

This command gets data for an object, optionally as a certain data type (see the as parameter description and the accompanying code example).

as class

You can have the script return the data for, say, the FontSync control panel’s default matching options in the specified data type. This code example gets the “on options” (e.g., font names, font types, encoding) for the control panel’s font specifications as text values separated by a semi-colon:

(* save the old text item delimiter which is the empty string "" *)
set old_delim to text item delimiters
set text item delimiters to ": " (* separate values with colon and space *)
tell application "FontSync"
   set dmo to default match options
   set on_opt to on options of dmo as text
end tell
set text item delimiters to old_delim
on_opt -- take a look at the on options
(* 
on options values:
"font names: font types: glyphs: encodings: QuickDraw metrics: 
ATSUI metrics: kerning: WorldScript layout: advanced layout: 
print encoding: missing data mismatches"
*)

quit

This command quits the FontSync control panel.

run

This sends a run Apple event to the FontSync control panel, which launches the program if it is not already open.

set

Use this command to set a property, as in the following code example:

tell application "FontSync" set default match options to {class:match options, on options:¬ {font names, font ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required