The FooDoo Lounge

Standard Additions 1.9.3 Dictionary

© Copyright Apple Computer, Inc. 1997-2003. All rights reserved.

Index

  1. User Interaction
  2. File Commands
  3. String Commands
  4. Clipboard Commands
  5. File Read/Write
  6. Scripting Commands
  7. Miscellaneous Commands
  8. Folder Actions
  9. Internet suite

User Interaction: Basic commands for interacting with the user

Classes:

Class dialog reply: Reply record for the ‘display dialog’ command

Properties:

button returned plain text [r/o] -- name of button chosen (empty if ‘giving up after’ was supplied and dialog timed out)

text returned plain text [r/o] -- text entered (present only if ‘default answer’ was supplied)

gave up boolean [r/o] -- Did the dialog time out? (present only if ‘giving up after’ was supplied)

Events:

beep: Beep 1 or more times

beep integer -- number of times to beep

choose URL: Choose a service on the Internet

choose URL

[showing a list of Web servers/FTP Servers/Telnet hosts/File servers/News servers/Directory services/Media servers/Remote applications] -- which network services to show

[editable URL boolean] -- Allow user to type in a URL?

Result: URL -- the URL chosen

choose application: Choose an application on this machine or the network

choose application

[with title plain text] -- the dialog window title

[with prompt plain text] -- the prompt to appear at the top of the application chooser dialog box

[multiple selections allowed boolean] -- Allow multiple items to be selected? (default is false)

[as type class] -- the desired type of result. May be application (the default) or alias.

Result: app -- the application chosen

choose color: Choose a color

choose color

[default color RGB color] -- the default color

Result: RGB color -- chosen color

choose file: Choose a file on a disk or server

choose file

[with prompt plain text] -- a prompt to be displayed in the file chooser

[of type a list of plain text] -- restrict the files shown to only these file types

[default location alias] -- the default file location

[invisibles boolean] -- Show invisible files and folders? (default is true)

[multiple selections allowed boolean] -- Allow multiple items to be selected? (default is false)

Result: alias -- to the chosen file

choose file name: Get a new file reference from the user, without creating the file

choose file name

[with prompt plain text] -- the text to display in the file creation dialog box

[default name plain text] -- the default name for the new file

[default location alias] -- the default file location

Result: 'file' -- the file the user specified

choose folder: Choose a folder on a disk or server

choose folder

[with prompt plain text] -- a prompt to be displayed in the folder chooser

[default location alias] -- the default folder location

[invisibles boolean] -- Show invisible files and folders? (default is false)

[multiple selections allowed boolean] -- Allow multiple items to be selected? (default is false)

Result: alias -- chosen folder

choose from list: Allows user to select an item from a list of strings

choose from list a list of plain text -- a list of strings to display (an empty list if no selection)

[with prompt plain text] -- the prompt to appear at the top of the list selection dialog

[default items a list of plain text] -- list of strings to initially select

[OK button name plain text] -- the name of the OK button

[cancel button name plain text] -- the name of the Cancel button

[multiple selections allowed boolean] -- Allow multiple items to be selected?

[empty selection allowed boolean] -- Can the user make no selection and then choose OK?

Result: a list of plain text -- the list of strings chosen

delay: Pause for a fixed amount of time

delay number -- the number of seconds to delay

display dialog: Display a dialog box, optionally requesting user input

display dialog plain text -- the text to display in dialog box

[default answer plain text] -- the default editable text

[buttons a list of plain text] -- a list of up to three button names

[default button number or string] -- the name or number of the default button

[with icon number or string] -- the name or ID of the icon to display…

[with icon stop/note/caution] -- …or one of these system icons

[giving up after integer] -- number of seconds to wait before automatically dismissing dialog

Result: dialog reply -- a record containing the button clicked and text entered (if any)

say: Speak the given text

say anything -- the text to speak, which can include intonation characters

[displaying plain text] -- the text to display in the feedback window (if different). Ignored unless Speech Recognition is on.

[using plain text] -- the voice to speak with. Ignored if Speech Recognition is on.

[waiting until completion boolean] -- wait for speech to complete before returning (default is true). Ignored unless Speech Recognition is on.

[saving to anything] -- the alias, file reference or path string of an AIFF file (existing or not) to contain the sound output.

File Commands: Commands to work with files without using the Finder

Classes:

Class file information: Reply record for the ‘info for’ command

Properties:

name Unicode text [r/o] -- the name of the item

displayed name Unicode text [r/o] -- the user-visible name of the item

name extension Unicode text [r/o] -- the name extension of the item (such as “txt”)

bundle identifier Unicode text [r/o] -- the item’s bundle identifier (if the item is a package)

kind Unicode text [r/o] -- the kind of the item

default application alias [r/o] -- the application that normally opens this kind of item

creation date date [r/o] -- the date the item was created

modification date date [r/o] -- the date the item was last modified

file type plain text [r/o] -- the file type of the item

file creator plain text [r/o] -- the creator type of the item

short version plain text [r/o] -- the item’s short version string (from the Finder’s ‘Get Info’ box)

long version plain text [r/o] -- the item’s long version string (from the Finder’s ‘Get Info’ box)

size integer [r/o] -- the size of the item in bytes

alias boolean [r/o] -- Is the item an alias file?

folder boolean [r/o] -- Is the item a folder?

package folder boolean [r/o] -- Is the item a package (a folder treated as a file?)

extension hidden boolean [r/o] -- Is the item’s name extension hidden from the user?

visible boolean [r/o] -- Is the item visible?

locked boolean [r/o] -- Is the item locked?

busy status boolean [r/o] -- Is the item currently in use?

icon position point [r/o] -- the coordinates of the item’s icon in its window or on the desktop

folder window bounding rectangle [r/o] -- the coordinates of the folder’s window (if the item is a folder)

Events:

info for: Return information for a file or folder

info for anything -- the alias or file reference to the file or folder

Result: file information -- a record containing the information for file or folder specified

list disks: Return a list of currently mounted disks

list disks

Result: a list of alias -- every volume on the desktop. Many volumes can be on the same disk drive.

list folder: Return the contents of a specified folder

list folder 'file' -- the alias or file reference to the folder

[invisibles boolean] -- List invisible files? (default is true)

Result: a list of Unicode text -- the list of the names of the items in the specified folder

mount volume: Mount the specified AppleShare volume

mount volume plain text -- the name or URL path (starting with ‘afp://’) of the volume to mount

on server plain text -- the server on which the volume resides

[in AppleTalk zone plain text] -- the AppleTalk zone in which the server resides

[as user name plain text] -- the user name with which to log in to the server; omit for guest access

[with password plain text] -- the password for the user name; omit for guest access

path to: Returns full path name to the folder or application specified

path to application support/applications folder/desktop/desktop pictures folder/documents folder/favorites folder/Folder Action scripts/fonts/frontmost application/help/home folder/internet plugins/keychain folder/library folder/modem scripts/movies folder/... -- the folder or application to return

[from system domain/local domain/network domain/user domain/Classic domain] -- where to look for the indicated folder

[as type class] -- the type to return: alias or string (default is alias)

[folder creation boolean] -- Create the folder if it doesn’t exist? (default is true)

Result: alias -- the path name to the folder or application specified

String Commands: Useful commands for working with text

Events:

ASCII character: Convert a number to an ASCII character

ASCII character small integer -- the ASCII code of the specified character

Result: plain text -- the character

ASCII number: Convert a character to its ASCII numeric value

ASCII number plain text -- the character

Result: small integer -- the ASCII code of the specified character

offset: Find one piece of text inside another

offset

of Unicode text -- the source text to find the position of

in Unicode text -- the target text to search in

Result: integer -- the position of the source text in the target, or 0 if not found

summarize: Summarize the specified text or text file

summarize anything -- the text (or an alias or file reference to a text file) to summarize

[in integer] -- the number of sentences desired in the summary

Result: plain text -- a summarized version of the text or file

Clipboard Commands: Access to the Clipboard in applications

Events:

clipboard info: Return information about the clipboard

clipboard info

[for type class] -- restricts to information about only this data type

Result: a list of list -- one list of {data type, size} for each type of data on the clipboard

set the clipboard to: Place data on an application’s clipboard. Use inside a ‘tell’ block and activate the application first

set the clipboard to anything -- the data to place on the clipboard

the clipboard: Return the contents of an application’s clipboard. Use in a ‘tell’ block after activating the application

the clipboard

[as type class] -- the type of data desired

Result: a list of anything -- the data from its clipboard

File Read/Write: Commands for reading and writing information in a file

Events:

close access: Close a file that was opened for access

close access anything -- the file reference number, alias, or file reference of the file to close

get eof: Return the length, in bytes, of a file opened for access

get eof anything -- a reference number, alias, or file reference of a file that has been opened for access

Result: double integer -- the total number of bytes in the file

open for access: Open a disk file for the read and write commands

open for access 'file' -- the file or alias to open for access. If the file does not exist, a new file is created.

[write permission boolean] -- whether to allow writing to the file.

Result: small integer -- a file reference number; use for ‘read’, ‘write’, and ‘close access’

read: Read data from a file that has been opened for access

read anything -- the reference number, alias, or file reference of the file to read

[using delimiter plain text] -- the value that separates items to read…

[using delimiters a list of plain text] -- …or a list of values that separate items to read

[as type class] -- the form in which to read and return data

[for double integer] -- the number of bytes to read from current position; if omitted, read until the end of the file

[before plain text] -- read up to but not including this character…

[until plain text] -- …or read up to and including this character

[from double integer] -- starting from this position; if omitted, start at last position read from

[to double integer] -- stopping at this position

Result: anything -- the data read from the file

set eof: Set end of file location for the specified file

set eof anything -- Reference number or file to set end of file location of

to double integer -- the new length of the file, in bytes. Any data beyond this position is lost.

write: Write data to a file that was opened for access with write permission

write anything -- the data to write to the file

[for double integer] -- the number of bytes to write; if not specified, write all the data provided

[starting at double integer] -- start writing at this position in the file

to anything -- the reference number or alias or file reference of the file to write to

[as type class] -- how to write the data: as text, data, list, etc.

Scripting Commands: Commands to work with scripts

Events:

load script: Return a script object loaded from a specified disk file

load script alias -- the file containing the script object to load

Result: script -- the script object loaded. You can get this object’s properties or call its handlers as if it were a local script object.

run script: Run a specified script or script file

run script script -- the script text (or an alias or file reference of a script file) to run

[with parameters a list of anything] -- list of parameters

[in plain text] -- the scripting component to use; default is the current scripting component

Result: anything -- the result of running the script

scripting components: Return a list of all scripting components (e.g. AppleScript)

scripting components

Result: a list of plain text -- a list of installed scripting components

store script: Store a script object into a file

store script script -- the script object to store

[in 'file'] -- the file or alias to store the script object in

[replacing ask/yes/no] -- control display of Save As dialog

Miscellaneous Commands: Other useful commands

Classes:

Class POSIX file: A file object specified with a POSIX (slash)-style pathname.

Properties:

POSIX path 'file' [r/o] -- the POSIX (slash)-style path of any file or alias object

Events:

current date: Return the current date and time

current date

Result: date -- the current date and time. Use ‘month of (current date)’, etc. to get individual parts.

do shell script: execute a shell script or command using the ‘sh’ shell

do shell script plain text -- the command or shell script to execute. Examples are ‘ls’ or ‘/bin/ps -auxwww’

[as type class] -- the desired type of result; default is Unicode text (UTF-8)

[administrator privileges boolean] -- execute the command as the administrator

[password plain text] -- use this administrator password to avoid a password dialog

[altering line endings boolean] -- change all line endings to Mac-style and trim a trailing one (default true)

[Result: plain text] -- the command output

random number: Generate a random number

random number number -- the upper limit; if not specified, result is a real between 0 and 1

[from number] -- the lowest number to return

[to number] -- the greatest number to return (up to but not including)

[with seed number] -- a starting point for a repeatable sequence of random numbers

Result: number -- a real number between 0 and 1, or an integer between the from and to values provided

round: Round number to integer

round real -- the number to round

[rounding up/down/toward zero/to nearest/as taught in school] -- the rounding direction; if omitted, rounds to nearest. “to nearest” rounds .5 cases to the nearest even integer in order to decrease cumulative errors. To always round .5 away from zero, use “as taught in school.”

Result: integer -- the rounded value

set volume: Set the sound output volume

set volume number -- the volume level, from 0 (silent) to 7 (full volume)

system attribute: Test attributes of this computer

system attribute type class -- the attribute to test (either a "Gestalt" value or a shell environment variable).

[has integer] -- test specific bits of response

Result: number or string -- the result of the query (or a list of all environment variables, if no attribute is provided)

time to GMT: Return the difference between local time and GMT (Universal Time)

time to GMT

Result: integer -- the difference between current time zone and Universal Time, in seconds

Folder Actions: Terms for Folder Actions handlers. These commands are sent to your folder action scripts.

Events:

adding folder items to: Called after new items have been added to a folder, but only when the folder’s window is open

adding folder items to alias -- Folder receiving the new items

after receiving a list of alias -- a list of the tems the folder received

closing folder window for: Called after a folder window has been closed

closing folder window for alias -- the folder that was closed

moving folder window for: Called after a folder window has been moved or resized

moving folder window for alias -- the folder whose window was moved or resized

from bounding rectangle -- the previous coordinates of folder window (you can get the new coordinates from the Finder)

opening folder: Called after a folder has been opened into a window

opening folder alias -- the folder that was opened

removing folder items from: Called after items have been removed from a folder, but only when the folder’s window is open

removing folder items from alias -- the folder losing the items

after losing a list of alias -- a list of the items the folder lost. For permanently deleted items, only the names (in strings) are provided.

Internet suite: Standard terms for Internet scripting

Classes:

Class FTP item: An item on an FTP server

Plural form:

FTP items

Properties:

properties record -- property that allows getting and setting of multiple properties

name plain text [r/o] -- the name of the FTP item

URL URL [r/o] -- the universal resource locator for this item

kind plain text [r/o] -- the kind of the FTP item (directory or file)

Class Internet address: An Internet or Intranet address for the TCP/IP protocol

Plural form:

Internet addresses

Properties:

properties record -- property that allows getting and setting of multiple properties

DNS form plain text -- the Domain Name System form of the address (e.g. apple.com)

dotted decimal form plain text -- the dotted-decimal form of the address (e.g. 17.255.1.1)

port integer -- the port number of the requested TCP/IP service

Class URL: A Uniform Resource Locator or Uniform Resource ID (URI)

Properties:

properties record -- property that allows getting and setting of multiple properties

name plain text [r/o] -- a name given to this URL, usually the name of the page it refers to

scheme http URL/secure http URL/ftp URL/mail URL/file URL (obsolete)/gopher URL/telnet URL/news URL/secure news URL/nntp URL/message URL/mailbox URL/multi URL/launch URL/afp URL/AppleTalk URL/remote application URL/streaming multimedia URL/... [r/o] -- the access scheme

host Internet address [r/o] -- the host specified by this URL

path plain text [r/o] -- the location of the target on the host

user name plain text [r/o] -- the user name by which to access this URL

password plain text [r/o] -- the password by which to access this URL

Class web page: A web page in HyperText Markup Language form

Plural form:

web pages

Properties:

properties record -- property that allows getting and setting of multiple properties

name plain text [r/o] -- the name of the web page

URL URL [r/o] -- the universal resource locator for this page

text encoding plain text [r/o] -- the text encoding method used for this page

Events:

handle CGI request: Sent to a script to process a Common Gateway Interface request

handle CGI request plain text -- the path of the URL

[searching for plain text] -- the data for the GET method or data after the ‘?’ in a POST method

[with posted data plain text] -- the POST arguments

[of content type plain text] -- the MIME content type of POST arguments

[using access method plain text] -- either ‘GET’ or ‘POST’

[from address plain text] -- the IP address of the entity making the request

[from user plain text] -- the user name associated with the request

[using password plain text] -- the password sent with the request

[with user info plain text] -- additional information about the user, usually the email address

[from server plain text] -- the name of the server application sending this request

[via port plain text] -- the IP port number of the server

[executing by plain text] -- the path to the script executing this CGI, in URL form

[referred by plain text] -- the URL of the page the client used to link to the CGI

[from browser plain text] -- the name of the client software

[using action plain text] -- the path to the file or CGI

[of action type plain text] -- either PREPROCESSOR, POSTPROCESSOR, CGI, or ACGI

[from client IP address plain text] -- the Internet address of the client

[with full request plain text] -- the full request as sent to the server

[with connection ID integer] -- the ID of the connection from the server to the client

[from virtual host plain text] -- the URL of the root folder of the virtual host

Result: web page -- An HTML page resulting from the CGI execution

open location: Opens a URL with the appropriate program

open location plain text -- the URL to open

[error reporting boolean] -- Should error conditions be reported in a dialog?

 

|| url: http://www.foodoo.sunreal.com.au/info/dictionaries/Std_Addns_193_asDict.html
|| created: 8-Aug-04, 3:47 PM; updated: 8-Aug-04, 3:45 PM
|| size: 90947 bytes