The FooDoo Lounge

Standard Additions 1.5.5 Dictionary

Copyright © 1997-2000 Apple Computer Inc., 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 display dialog command

Properties:

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

text returned string [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 a running application on this machine or the network

choose application

[application label string] -- the prompt to appear above the application list

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

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

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

Result: app -- the application chosen

choose file: Choose a file on a disk or server

choose file

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

[of type list] -- restrict the files shown to only these file types (up to 4)

Result: alias -- to the chosen file

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

choose file name

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

[default name string] -- the default name for the new file

Result: file specification -- represents the file the user specified

choose folder: Choose a folder on a disk or server

choose folder

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

Result: alias -- chosen folder

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

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

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

[default items list] -- list of strings to initially select

[OK button name string] -- the name of the OK button

[cancel button name string] -- 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: list -- the list of strings chosen

delay: Pause for a fixed amount of time

delay integer -- the number of seconds to delay

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

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

[default answer string] -- the default editable text

[buttons list] -- 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 string] -- the text to display in the feedback window (if different). Ignored unless Speech Recognition is on.

[using string] -- the voice to speak with

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

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

Classes:

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

Properties:

name international text [r/o] -- the file name of the item, in local text

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

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 string [r/o] -- the file type of the file

file creator string [r/o] -- the creator type of the file

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

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

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 folder’s window (if the item is a folder)

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

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

locked boolean [r/o] -- Is this file locked?

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

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

busy status boolean [r/o] -- is the file currently in use?

Events:

info for: Return information for a file or folder

info for file specification -- the alias, file specification, or path 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 list -- 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 specification -- the alias, file specificion, or path to the folder

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

Result: a list of list -- the list of the items in the specified folder

mount volume: Mount the specified AppleShare volume

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

on server string -- the server on which the volume resides

[in AppleTalk zone string] -- the AppleTalk zone in which the server resides

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

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

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

path to apple menu/application support/control panels/control strip modules/desktop/desktop pictures folder/extensions/Folder Action scripts/fonts/help/launcher items folder/modem scripts/plugins/preferences/printer descriptions/printer drivers/printmonitor/... -- the folder or application to return

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

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: string -- the character

ASCII number: Convert a character to its ASCII numeric value

ASCII number string -- the character

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

offset: Find one piece of text inside another

offset

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

in international 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 specification of a text file) to summarize

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

Result: string -- 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: 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 specification 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 specification of a file that has been opened for access

Result: 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 alias -- the file to open for access. If this is a file specification of a file that 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 specification of the file to read

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

[using delimiters list] -- …or up to 2 values that separate items to read

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

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

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

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

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

[to 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 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 integer] -- the number of bytes to write; if not specified, write all the data provided

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

to anything -- the reference number or alias or file specification 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 (or an alias of file specification of a script file) to run

[with parameters list] -- list of parameters

[in string] -- 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: list -- 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 specification -- the file to store the script object in

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

Miscellaneous Commands: Other useful commands

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.

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)

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 string [r/o] -- the name of the FTP item

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

kind string [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 string -- the Domain Name System form of the address (e.g. apple.com)

dotted decimal form string -- 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 Universal Resource Locator or Universal Resource ID (URI)

Plural form:

URLs

Properties:

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

name string [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/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/network file system URL/... [r/o] -- the access scheme

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

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

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

password string [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 string [r/o] -- the name of the web page

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

text encoding string [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 string -- the path of the URL

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

[with posted data string] -- the POST arguments

[of content type string] -- the MIME content type of POST arguments

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

[from address string] -- the IP address of the entity making the request

[from user string] -- the user name associated with the request

[using password string] -- the password sent with the request

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

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

[via port string] -- the IP port number of the server

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

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

[from browser string] -- the name of the client software

[using action string] -- the path to the file or CGI

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

[from client IP address string] -- the Internet address of the client

[with full request string] -- the full request as sent to the server

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

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

open location: Opens a URL with the appropriate program (your favorite browser)

open location string -- 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_155_asDict.html
|| created: 27-Aug-04, 1:16 PM; updated: 27-Aug-04, 1:23 PM
|| size: 80130 bytes