Core Suite: Common events all applications should understand.

open: Open the specified object(s)

    open  reference  -- Objects to open. Can be a list of files or an object specifier.

run: Sent to an application when it is double-clicked

    run

quit: Quit application

    quit

        [saving  yes/no/ask]  -- specifies whether to save currently open documents

reopen: Reactivate a running application.  Some applications will open a new untitled window if no window is open.

    reopen

print: Print the specified object(s)

    print  reference  -- list of objects to print

close: Close an object

    close  reference  -- the object to close

        [saving  yes/no/ask]  -- specifies whether changes should be saved before closing

        [saving in  alias]  -- the file in which to save the object

count: Return the number of elements of an object

    count  reference  -- the object whose elements are to be counted

        [each  type class]  -- if specified, restricts counting to objects of this class

    Result:   integer  -- the number of elements

delete: Delete an object from its container. Note this does not work on script variables, only on elements of application classes.

    delete  reference  -- the element to delete

duplicate: Duplicate one or more objects

    duplicate  reference  -- the object(s) to duplicate

        [to  location reference]  -- the new location for the object(s)

        [with properties   record]  -- the initial values for properties of the new object that are to be different from the original

    Result:   reference  -- to the duplicated object(s)

exists: Verify if an object exists

    exists  reference  -- the object in question

    Result:   boolean  -- true if it exists, false if not

make: Make a new element

    make

        new  type class  -- the class of the new element

        [at  location reference]  -- the location at which to insert the element

        [with data  anything]  -- the initial data for the element

        [with properties   record]  -- the initial values for the properties of the element

    Result:   reference  -- to the new object(s)

move: Move object(s) to a new location

    move  reference  -- the object(s) to move

        to  location reference  -- the new location for the object(s)

    Result:   reference  -- to the object(s) after they have been moved

save: Save an object

    save  reference  -- the object to save, usually a document or window

        [in  alias]  -- the file in which to save the object

        [as  type class]  -- the file type of the document in which to save the data

select: Make a selection

    select  reference  -- the object to select

data size: (optional) Return the size in bytes of an object

    data size  reference  -- the object whose data size is to be returned

        [as  type class]  -- the data type for which the size is calculated

    Result:   integer  -- the size of the object in bytes

suite info: (optional) Get information about event suite(s)

    suite info  type class  -- the suite for which to return information

        [in  'intl']  -- the human language and script system in which to return information

    Result:   type suite info  -- a record containing the suites and their versions

event info: (optional) Get information about the Apple events in a suite

    event info  type class  -- the event class of the Apple events for which to return information

        [in  'intl']  -- the human language and script system in which to return information

    Result:   type event info  -- a record containing the events and their parameters

class info: (optional) Get information about an object class

    class info  type class  -- the object class about which information is requested

        [in  'intl']  -- the human language and script system in which to return information

    Result:   type class info  -- a record containing the object’s properties and elements

Class application: An application program

Plural form:

    applications

Properties:

    name  international text  [r/o]  -- the name of the application

    frontmost  boolean  [r/o]  -- Is this the frontmost application?

    selection  selection-object  -- the selection visible to the user.

       Use the ‘select’ command to set a new selection; use ‘contents of selection’ to get or change information in the document.

    clipboard  a list of anything  -- the contents of the clipboard for this application

    version  version  [r/o]  -- the version of the application

Class document: A document of a scriptable application

Plural form:

    documents

Properties:

    modified  boolean  [r/o]  -- Has the document been modified since the last save?

Class file: a file on a disk or server (or a file yet to be created)

Plural form:

    files

Properties:

    stationery  boolean  -- Is the file a stationery file?

Class alias: a file on a disk or server. The file must exist when you check the syntax of your script.

Plural form:

    aliases

Class selection-object: A way to refer to the state of the current of the selection. Use the ‘select’ command to make a new selection.

Properties:

    contents  anything  -- the information currently selected.  Use ‘contents of selection’ to get or change information in a document.

Class window: A window

Plural form:

    windows

Properties:

    bounds  bounding rectangle  -- the boundary rectangle for the window

    closeable  boolean  [r/o]  -- Does the window have a close box?

    titled  boolean  [r/o]  -- Does the window have a title bar?

    index  integer  -- the number of the window

    floating  boolean  [r/o]  -- Does the window float?

    modal  boolean  [r/o]  -- Is the window modal?

    resizable  boolean  [r/o]  -- Is the window resizable?

    zoomable  boolean  [r/o]  -- Is the window zoomable?

    zoomed  boolean  -- Is the window zoomed?

    visible  boolean  -- Is the window visible?

Class insertion point: An insertion location between two objects

Plural form:

    insertion points