You are on page 1of 5

Standard Suite Common classes and commands for all applications.

open v : Open a document.


open list of file : The file(s) to be opened.

save options enum
yes : Save the file.
no : Do not save the file.
ask : Ask the user whether or not to save the file.

close v : Close a document.


close specifier : the document(s) or window(s) to close.
[saving yes/​no/​ask] : Whether or not changes should be saved before closing.
[saving in file] : The file in which to save the document.

save v : Save a document.


save specifier : The document(s) or window(s) to save.
[in file] : The file in which to save the document.

printing error handling enum


standard : Standard PostScript error handling
detailed : print a detailed report of PostScript errors

print settings n
PROPERTIES
copies (integer) : the number of copies of a document to be printed
collating (boolean) : Should printed copies be collated?
starting page (integer) : the first page of the document to be printed
ending page (integer) : the last page of the document to be printed
pages across (integer) : number of logical pages laid across a physical page
pages down (integer) : number of logical pages laid out down a physical page
error handling (standard/​detailed) : how errors are handled
fax number (text) : for fax number
target printer (text) : for target printer

print v : Print a document.


print list of file or specifier : The file(s), document(s), or window(s) to be printed.
[with properties print settings] : The print settings to use.
[print dialog boolean] : Should the application show the print dialog?

quit v : Quit the application.


quit
[saving yes/​no/​ask] : Whether or not changed documents should be saved
before closing.
count v : Return the number of elements of a particular class within an object.
count specifier : the object whose elements are to be counted
[each type] : The class of objects to be counted.
→ integer : the number of elements

delete v : Delete an object.


delete specifier : the object to delete

duplicate v : Copy object(s) and put the copies at a new location.


duplicate specifier : the object(s) to duplicate
to location specifier : The location for the new object(s).
[with properties record] : Properties to be set in the new duplicated object(s).

exists v : Verify if an object exists.


exists specifier : the object in question
→ boolean : true if it exists, false if not

make v : Make a new object.


make
new type : The class of the new object.
[at location specifier] : The location at which to insert the object.
[with data any] : The initial contents of the object.
[with properties record] : The initial values for properties of the object.
→ specifier : to the new object

move v : Move object(s) to a new location.


move specifier : the object(s) to move
to location specifier : The new location for the object(s).

application n [see also Terminal Suite] : The application‘s top-level scripting object.
ELEMENTS
contains windows.
PROPERTIES
name (text, r/o) : The name of the application.
frontmost (boolean, r/o) : Is this the frontmost (active) application?
version (text, r/o) : The version of the application.
RESPONDS TO
open, print, quit, get URL.

window n : A window.
ELEMENTS
contains tabs; contained by application.
PROPERTIES
name (text, r/o) : The full title of the window.
id (integer, r/o) : The unique identifier of the window.
index (integer) : The index of the window, ordered front to back.
bounds (rectangle) : The bounding rectangle of the window.
closeable (boolean, r/o) : Whether the window has a close box.
miniaturizable (boolean, r/o) : Whether the window can be minimized.
miniaturized (boolean) : Whether the window is currently minimized.
resizable (boolean, r/o) : Whether the window can be resized.
visible (boolean) : Whether the window is currently visible.
zoomable (boolean, r/o) : Whether the window can be zoomed.
zoomed (boolean) : Whether the window is currently zoomed.
frontmost (boolean) : Whether the window is currently the frontmost Terminal
window.
selected tab (tab) :
position (point) : The position of the window, relative to the upper left corner of
the screen.
Deprecated; use bounds instead.
origin (point) : The position of the window, relative to the lower left corner of the
screen.
Deprecated; use bounds instead.
size (point) : The width and height of the window
Deprecated; use bounds instead.
frame (rectangle) : The bounding rectangle, relative to the lower left corner of the
screen.
Deprecated; use bounds instead.
RESPONDS TO
close, print, save.

Terminal Suite Terminal specific classes.

color n

do script v : Runs a UNIX shell script or command.


do script [text] : The command to execute.
[in tab, window, or any] : The tab in which to execute the command
→ tab : The tab the command was executed in.

application n [see also Standard Suite]


ELEMENTS
contains settings sets.
PROPERTIES
default settings (settings set) : The settings set used for new windows.
startup settings (settings set) : The settings set used for the window created on
application startup.
settings set n : A set of settings.
ELEMENTS
contained by application.
PROPERTIES
id (integer, r/o) : The unique identifier of the settings set.
name (text) : The name of the settings set.
number of rows (integer) : The number of rows displayed in the tab.
number of columns (integer) : The number of columns displayed in the tab.
cursor color (color) : The cursor color for the tab.
background color (color) : The background color for the tab.
normal text color (color) : The normal text color for the tab.
bold text color (color) : The bold text color for the tab.
font name (text) : The name of the font used to display the tab’s contents.
font size (integer) : The size of the font used to display the tab’s contents.
font antialiasing (boolean) : Whether the font used to display the tab’s contents
is antialiased.
clean commands (list of text) : The processes which will be ignored when
checking whether a tab can be closed without showing a prompt.
title displays device name (boolean) : Whether the title contains the device
name.
title displays shell path (boolean) : Whether the title contains the shell path.
title displays window size (boolean) : Whether the title contains the tab’s size,
in rows and columns.
title displays settings name (boolean) : Whether the title contains the settings
name.
title displays custom title (boolean) : Whether the title contains a custom title.
custom title (text) : The tab’s custom title.

tab n : A tab.
ELEMENTS
contained by windows.
PROPERTIES
number of rows (integer) : The number of rows displayed in the tab.
number of columns (integer) : The number of columns displayed in the tab.
contents (text, r/o) : The currently visible contents of the tab.
history (text, r/o) : The contents of the entire scrolling buffer of the tab.
busy (boolean, r/o) : Whether the tab is busy running a process.
processes (list of text, r/o) : The processes currently running in the tab.
selected (boolean) : Whether the tab is selected.
title displays custom title (boolean) : Whether the title contains a custom title.
custom title (text) : The tab’s custom title.
tty (text, r/o) : The tab’s TTY device.
current settings (settings set) : The set of settings which control the tab’s
behavior and appearance.
cursor color (color) : The cursor color for the tab.
Deprecated; use current settings instead.
background color (color) : The background color for the tab.
Deprecated; use current settings instead.
normal text color (color) : The normal text color for the tab.
Deprecated; use current settings instead.
bold text color (color) : The bold text color for the tab.
Deprecated; use current settings instead.
clean commands (list of text) : The processes which will be ignored when
checking whether a tab can be closed without showing a prompt.
Deprecated; use current settings instead.
title displays device name (boolean) : Whether the title contains the device
name.
Deprecated; use current settings instead.
title displays shell path (boolean) : Whether the title contains the shell path.
Deprecated; use current settings instead.
title displays window size (boolean) : Whether the title contains the tab’s size,
in rows and columns.
Deprecated; use current settings instead.
title displays file name (boolean) : Whether the title contains the file name.
Deprecated; use current settings instead.
font name (text) : The name of the font used to display the tab’s contents.
Deprecated; use current settings instead.
font size (integer) : The size of the font used to display the tab’s contents.
Deprecated; use current settings instead.
font antialiasing (boolean) : Whether the font used to display the tab’s contents
is antialiased.
Deprecated; use current settings instead.

You might also like