This page uses CSS, and renders properly in the latest versions of Microsoft Internet Explorer and Mozilla.
This is Frontier: The Definitive Guide by Matt Neuburg, unabridged and unaltered from the January 1998 printing.
It deals with the freeware Frontier 4.2.3; for commercial Frontier 8, look here, and for the inexpensive Radio UserLand, look here. See my Web site for information.
Those wishing an offline or printed copy may purchase the book, which is still in print.
Copyright 1998 O'Reilly & Associates, Inc. ALL RIGHTS RESERVED. Reprinted with permission.
TOP UP: Reference NEXT: Apple Event Suites

46

Verbs

For the coercion verbs, see Table 10-1. For UserTalk keywords, see Part II, UserTalk Basics. For the core, misc, and required verbs, see Chapter 47, Apple Event Suites.

Verbs are listed here in alphabetical order, single-element verbs followed by double-element verbs.

alt
abs

abs (number)

Returns the absolute value of number.

alt
appleEvent

appleEvent (appID,type,subtype,name1,value1,...)
appleEvent (appID,type,subtype,table,...)
appleEvent (appID,type,subtype,record,...)

Sends to the process specified by appID an Apple event of type type and subtype subtype. The name-value pairs that are the parameters of the Apple event may be expressed in any of three ways: a name parameter followed by a value parameter, a table, or a record. These methods of expression may be combined.

The values in the name-value pairs are sent with whatever datatype they actually have; if binary, the internal datatype is used. The type, subtype, and the names in the name-value pairs must be string4s.

appID may be either the process's string4 creator code or its string name, or, if the process is remote, either the binary that is returned from sys.browseNetwork() or a case-sensitive network address string of the form " zone: machine ID:- processName" (where zone can be "*" to signify the local zone).

If appID is 0 the Apple event will be directed to the system.

alt
callXCMD

callXCMD (addrBinary, [param1, param2...])

Calls an XCMD. addrBinary must point to a binary of internal datatype 'XCMD' or 'XFCN'. The other parameters are strings expected as parameters by the XCMD.

alt
close

close (addrObject)

If the object at addrObject is a non-scalar whose edit window is open, closes the window, also returning to the default target situation if the object was the target. Otherwise, returns false and does nothing.

alt
complexEvent

complexEvent (addr,appID,type,subtype,name1,value1,...)
complexEvent (addr,appID,type,subtype,table,...)
complexEvent (addr,appID,type,subtype,record,...)

Identical to calling appleEvent(), but the result returned from the other application goes into a table of name-value pairs at addr.

alt
defined

defined (objectReference)

Special form. Returns a boolean saying whether the object objectReference exists. An object exists if it has a value, even if that value was not explicitly assigned (i.e., it might be nil). Never raises an error.

alt
delete

delete (addrObject)

If addrObject is an array specifier, removes the specified item from the array. Otherwise, destroys the object at addrObject.

alt
displayString

displayString (value)

If value is a binary or a datatype that can be represented by a literal in UserTalk, returns a string consisting of the characters you would have to type in a UserTalk expression to represent value as a literal. Otherwise, returns the result of coercing value to a string.

If value is a string4 and is the value of an object in the current scope, returns the name of that object.

alt
edit

edit (addrObject)

If the object at addrObject is a non-scalar, explicitly declares it to be the target, opening its edit window visibly and making it frontmost. If the object is a scalar, explicitly declares its parent table to be the target, opening its edit window visibly and making it frontmost, and selecting the entry representing the object.

alt
evaluate

evaluate (string)

Evaluates string as a UserTalk expression and returns the result.

alt
finderEvent

finderEvent (appID,type,subtype,name1,value1,...)
finderEvent (appID,type,subtype,table,...)
finderEvent (appID,type,subtype,record,...)

Identical to calling appleEvent(), but returns immediately without waiting for a response.

alt
gestalt

gestalt (selector)

Returns the result of calling the Gestalt Manager with string4 parameter selector. Knowing what information can be obtained from the Gestalt Manager, and how to interpret the results, is up to you.

alt
getBinaryType

getBinaryType (binary)

Returns the string4 which is the internal datatype of binary.

alt
memAvail

memAvail ()

Returns the amount of free RAM memory in Frontier's heap, in bytes.

alt
mod

mod (dividend, divisor)

Returns the integer remainder when the integer dividend is divided by integer divisor. It is a runtime error if dividend or divisor is not an integer.

alt
msg

msg (string)

Displays string (which is coerced to a string) in the Main Window message area. If string is "", returns control of the Main Window message area to the agent currently selected in the Main Window popup.

alt
nameOf

nameOf (objectReference)

Special form. If objectReference is a defined object with a name, such as an item of a record or a table entry or a variable, returns that name as a string; otherwise, returns the empty string. The name of a table entry is its name within its table, not a path. Never raises an error.

alt
new

new (datatype, addrObject)

Creates an object at addrObject whose value is the result of coercing nil to datatype. If the object at addrObject already exists, its old value is lost.

alt
pack

pack (value, addrDest)

Coerces value to a binary, setting its internal datatype to the datatype of value, and stores the result in the object at addrDest.

alt
parentOf

parentOf (objectReference)

Special form. Returns the address of the table of which objectReference is an entry; if there is no such table,1 returns the empty string. Never raises an error.

alt
random

random (integer1, integer2)

Returns a pseudo-random integer between integer1 and integer2 inclusive.

alt
rollBeachball

rollBeachball ()

Changes Frontier's cursor to a rolling beachball. Needs to be called at least twice to have an effect. If successive calls occur within 10 ticks of each other, then the rolling beachball cursor persists only until the calls cease. If successive calls occur more than 10 ticks apart, then the rolling beachball persists until execution ceases. The frequency of calls has no effect upon the speed at which the beachball rolls.

alt
scriptError

scriptError (string)

Throws an error whose error message is string.

alt
setBinaryType

getBinaryType (addrBinary, string4)

Sets the internal datatype of the binary at addrBinary to string4.

alt
setEventInteraction

setEventInteraction (boolean)

Causes any subsequent call to appleEvent(), complexEvent(), tableEvent() or transactionEvent() within this thread to have associated with it an event interaction value of boolean. The default value is true.

alt
setEventTimeout

setEventTimeout (seconds)

Causes any subsequent call to appleEvent(), complexEvent(), tableEvent() or transactionEvent() within this thread to have associated with it a timeout value of seconds seconds. The default value (infinity) is restored when the thread expires or setEventTimeout(-1) is called.

alt
setEventTransactionID

setEventTransactionID (transID)

Causes any subsequent call to appleEvent(), complexEvent(), or table-Event() within this thread to be transmuted before sending to a transactionEvent() call with a transID value of transID. This situation remains in effect until the thread expires or setEventTransactionID(0) is called.

alt
sizeOf

sizeOf (objRef)

Special form. If objRef refers to an array, returns the number of items in the array. If it refers to an outline, script, or menubar, returns the number of lines. If it refers to a wptext, returns the number of characters. Otherwise, returns the storage space (in bytes) occupied by objRef.

alt
syscrash

syscrash ([string])

Falls into the system-level debugger, optionally displaying string.

alt
systemEvent

systemEvent (type,subtype,name1,value1,...)
systemEvent (type,subtype,table,...)
systemEvent (type,subtype,record,...)

Identical to calling appleEvent() with an appID of 0.

alt
tableEvent

tableEvent (addrTable,addr,appID,type,subtype,

name1,value1,...)

tableEvent (addrTable,addr,appID,type,subtype,table,...)
tableEvent (addrTable,addr,appID,type,subtype,record,...)

Identical to calling complexEvent(), but addrTable points to a table to be used for some or all of the input name-value pairs.

alt
timeCreated

timeCreated (addrObject)

If the object at addrObject is a non-scalar, returns the date when it was created; if it is a scalar, returns false.

alt
timeModified

timeModified (addrObject)

If the object at addrObject is a non-scalar, returns the date when it was last modified; if it is a scalar, returns false.

alt
transactionEvent

transactionEvent (appID,type,subtype,transID,

name1,value1,...)

transactionEvent (appID,type,subtype,transID,table,...)
transactionEvent (appID,type,subtype,transID,record,...)

Identical to calling appleEvent(), but the transaction ID transID proves to the target process that we have permission to speak to it during this transaction. Rarely called directly; see setEventTransaction().

alt
typeOf

typeOf (value)

Returns the string4 designator of the datatype of value.

alt
unpack

unpack (addrSource, addrDest)

Coerces the binary value at addrSource into that binary's internal type, and stores the result in the object at addrDest.

alt
app.clearNetworkApp

app.clearNetworkApp ()

Deletes app.idNetworkApp, to signal that the next time app.startWithDocument() is called, it should launch the local copy of the application, and make the glue table's addressee application be the local copy.

alt
app.linkToNetworkApp

app.linkToNetworkApp (remoteID)

Sets app.idNetworkApp to remoteID, to signal that the next time app.startWithDocument() is called, it should make the glue table's addressee application be the remote process specified by remoteID.

alt
app.start

app.start (glueTableName)

Calls app.startWithDocument() with a second parameter of nil. Normally, there is no need to call app.start() directly, but it might be necessary to call it if a glue table has no launch() script, as a way of changing the glue table's addressee application.

alt
app.startWithDocument

app.startWithDocument (glueTableName, docPathname)

Checks app.idNetworkApp to see if we are to address a remote application. If so, copies app.idNetworkApp into the id entry of the glue table in system.verbs.apps named glueTableName ; if not, copies the glue table's appInfo.id into its id entry. This sets the glue table's addressee application. Launches the application specified by id if it is not running, telling it to open the file at docPathname if it is not the empty string (or nil). Normally, should not be called directly: either a glue table's launch() script or app.start() will call it for you.

alt
bit.clear

bit.clear (longInteger, whatBit)

Returns longInteger with its bit whatBit cleared to 0; whatBit is between 0 and 31, where 0 is the low-order bit.

alt
bit.get

bit.get (longInteger, whatBit)

Returns true or false as longInteger 's bit whatBit is 1 or 0; whatBit is between 0 and 31, where 0 is the low-order bit.

alt
bit.set

bit.set (longInteger, whatBit)

Returns longInteger with its bit whatBit set to 1; whatBit is between 0 and 31, where 0 is the low-order bit.

alt
card.close

card.close ()

Closes the current card.

alt
card.getObjectEnabled

card.getObjectEnabled (objectName)

Returns a boolean saying whether the object named objectName in the current card is enabled.

alt
card.getObjectFlag

card.getObjectFlag (objectName)

Returns the boolean status of the object named objectName in the current card. The boolean status of a radio button or check box is true if it is highlighted or checked, false if not. The boolean status of an ordinary button is whether it is the default button or not.

alt
card.getObjectText

card.getObjectText (objectName)

Returns the text of the object named objectName in the current card. The text of a button is its title. The text of a text field, whether user-editable or not, is the text in the field.

alt
card.getObjectVisible

card.getObjectVisible (objectName)

Returns a boolean saying whether the object named objectName in the current card is visible.

alt
card.isModal

card.isModal ()

Returns a boolean saying whether the current card is modal.

alt
card.popup.getCheckedItem

card.popup.getCheckedItem (objectName)

Returns the number of the currently chosen menu item of the popup menu named objectName in the current card.

alt
card.popup.getHasLabel

card.popup.getHasLabel (objectName)

Returns a boolean saying whether the label of the popup menu named objectName in the current card is visible.

alt
card.popup.getMenu

card.popup.getMenu (objectName)

Returns the menu item list of the popup menu named objectName in the current card. A menu item list is a string of menu item names separated by semicolons. A separator line is indicated by a hyphen.

alt
card.popup.getSelectedText

card.popup.getSelectedText (objectName)

Returns the name of the currently chosen menu item of the popup menu named objectName in the current card.

alt
card.popup.setCheckedItem

card.popup.setCheckedItem (objectName, itemNumber)

Causes the menu item whose number is itemNumber of the popup menu named objectName in the current card to become the currently chosen menu item.

alt
card.popup.setHasLabel

card.popup.setHasLabel (objectName, visible?)

Shows or hides the label of the popup menu named objectName in the current card, depending on the boolean visible?.

alt
card.popup.setMenu

card.popup.setMenu (objectName, string)

Sets the menu item list of the popup menu named objectName in the current card to string. A menu item list is a string of menu item names separated by semicolons. A separator line is indicated by a hyphen.

alt
card.popup.setSelectedText

card.popup.setSelectedText (objectName, itemText)

Causes the menu item whose name is itemText of the popup menu named objectName in the current card to become the currently chosen menu item.

alt
card.run

card.run (addrCardObject)

Displays as a dialog the card object at addrCardObject.

alt
card.setObjectEnabled

card.setObjectEnabled (objectName, enabled?)

Enables or disables the object named objectName in the current card, depending on the boolean enabled?.

alt
card.setObjectFlag

card.setObjectFlag (objectName, boolean)

Sets the boolean status of the object named objectName in the current card to boolean. The boolean status of a radio button or check box is true if it is highlighted or checked, false if not. The boolean status of an ordinary button is whether it is the default button or not.

alt
card.setObjectText

card.setObjectText (objectName, string)

Sets the text of the object named objectName in the current card to string. The text of a button is its title. The text of a text field, whether user-editable or not, is the text in the field.

alt
card.setObjectVisible

card.setObjectVisible (objectName, visible?)

Shows or hides the object named objectName in the current card, depending on the boolean visible?.

alt
clipboard.get

clipboard.get (MacOSFormat, addrObject)

Copies the MacOSFormat component of the system scrap's contents into the object at addrObject as a binary whose internal data type is MacOSFormat, which will typically be 'TEXT' or 'PICT'.

alt
clipboard.getValue

clipboard.getValue (MacOSFormat)

Returns the MacOSFormat component of the system scrap's contents, unpacked so as to be of type MacOSFormat, which will typically be 'TEXT' or 'PICT'.

alt
clipboard.put

clipboard.put (MacOSFormat, addrObject)

Copies the value of the object at addrObject onto the system scrap in the format MacOSFormat, which will typically be 'TEXT' or 'PICT'.

alt
clipboard.putValue

clipboard.putValue (value)

Calls clipboard.put() to copy value onto the system scrap, supplying MacOSFormat from the datatype (or, if a binary, the internal datatype) of value.

alt
clock.now

clock.now ()

Returns the date from the system clock.

alt
clock.set

clock.set (dateTime)

Sets the system clock to dateTime.

alt
clock.sleepFor

clock.sleepFor (seconds)

Within an agent script (or a script called by an agent script), tells Frontier to call the agent script again seconds seconds after the agent script finishes executing. An agent script that never calls this verb will be called again one second after it finishes executing. Within a modeless dialog proc, puts the dialog to sleep temporarily. It is a runtime error to use this verb outside either the agent thread or a modeless dialog proc.

alt
clock.ticks

clock.ticks ()

Returns the number of ticks (approximately sixtieths of a second) that have elapsed since the computer was started up.

alt
clock.waitSeconds

clock.waitSeconds (n)

Pauses for n seconds. n is coerced to an integer.

alt
clock.waitSixtieths

clock.waitSixtieths (n)

Pauses for n sixtieths of a second. n is coerced to an integer.

alt
date.abbrevString

date.abbrevString (date)

Returns the system's abbrevDate string representation of date.

alt
date.dayOfWeek

date.dayOfWeek (date)

Returns the day-of-week number for date, where 1 represents Sunday.

alt
date.daysInMonth

date.daysInMonth (date)

Returns the number of days in the month in which date falls.

alt
date.dayString

date.dayString (number)

Returns the name of the day denoted by the day-of-week number number, or the empty string if number is not an integer from 1 to 7.

alt
date.firstOfMonth

date.firstOfMonth (date)

Returns the date value for 12:00 midnight on the first day of the month in which date falls.

alt
date.get

date.get (theDate, addrDay, addrMonth, addrYear,
          addrHour, addrMin, addrSec)

Analyzes theDate into numerical values (shorts) and stores them at the addresses provided in the other parameters.

alt
date.lastOfMonth

date.lastOfMonth (date)

Returns the date value for 12:00 midnight on the last day of the month in which date falls.

alt
date.longString

date.longString (date)

Returns the system's longDate string representation of date.

alt
date.nextMonth

date.nextMonth (date)

Returns the date resulting from adding 1 to date 's month component.

alt
date.nextWeek

date.nextWeek (date)

Returns the date resulting from adding 7 to date 's day component.

alt
date.nextYear

date.nextYear (date)

Returns the date resulting from adding 1 to date 's year component.

alt
date.prevMonth

date.prevMonth (date)

Returns the date resulting from subtracting 1 from date 's month component.

alt
date.prevWeek

date.prevWeek (date)

Returns the date resulting from subtracting 7 from date 's day component.

alt
date.prevYear

date.prevYear (date)

Returns the date resulting from subtracting 1 from date 's year component.

alt
date.set

date.set (day, month, year, hour, min, sec)

Returns a date constructed from the numeric parameters; they are coerced to integers before use.

alt
date.shortString

date.shortString (date)

Returns the system's shortDate string representation of date.

alt
date.tomorrow

date.tomorrow (date)

Returns the date resulting from adding 1 to date 's day component.

alt
date.weeksInMonth

date.weeksInMonth (date)

Returns date.daysInMonth( date) integer-divided by 7.

alt
date.yesterday

date.yesterday (date)

Returns the date resulting from subtracting 1 from date 's day component.

alt
db.close

db.close (pathname)

Closes, without saving, the database at pathname, which must have been opened with db.open().

alt
db.countItems

db.countItems (pathname, entryPathString)

Returns the number of entries in the table object entryPathString in the database at pathname, which must have been opened with db.open(). If the object does not exist or is not a table, an error will be raised.

alt
db.defined

db.defined (pathname, entryPathString)

Returns a boolean reporting whether an object entryPathString exists in the database at pathname, which must have been opened with db.open().

alt
db.delete

db.delete (pathname, entryPathString)

Destroys the object entryPathString in the database at pathname, which must have been opened with db.open(). If the object does not exist, an error will be raised.

alt
db.get

db.get (entryPathString)

Called from an AppleScript script, returns the value of the database object named by entryPathString.

alt
db.getNthItem

db.getNthItem (pathname, entryPathString, n)

Returns the value of the n th entry in the table object entryPathString in the database at pathname, which must have been opened with db.open(). If the object does not exist or is not a table, an error will be raised.

alt
db.getValue

db.getValue (pathname, entryPathString)

Returns the value of the object entryPathString in the database at pathname, which must have been opened with db.open(). If the object does not exist, an error will be raised.

alt
db.isTable

db.isTable (pathname, entryPathString)

Returns a boolean reporting whether the object entryPathString in the database at pathname, which must have been opened with db.open(), is a table. If the object does not exist, an error will be raised.

alt
db.new

db.new (pathname)

Creates a new minimal database on disk, at pathname. If there is already a file or empty folder at pathname, it is deleted first. The new database is not opened.

alt
db.newTable

db.newTable (pathname, tablePathString)

Creates at tablePathString a new table in the database at pathname, which must have been opened with db.open(). If an object already exists at this location, it will be deleted first. If the proposed table's parent does not exist, an error will be raised.

alt
db.open

db.open (pathname, readOnly?)

Opens the existing database at pathname, ready to work with it programmatically through the other db verbs. The boolean readOnly? is not optional.

alt
db.save

db.save (pathname)

Saves the database at pathname, which must have been opened with db.open(), returning a boolean reporting whether it did in fact save the database.

alt
db.set

db.set (entryPathString, value)

Called from an AppleScript script, sets to value the database object named by entryPathString.

alt
db.setValue

db.setValue (pathname, entryPathString, value)

Sets to value the value of the object entryPathString in the database at pathname, which must have been opened with db.open(). The object will be created if necessary. If an object already exists at this location, it will be deleted first. If the proposed table's parent does not exist, an error will be raised.

alt
dialog.alert

dialog.alert (text)

Displays a modal dialog containing an "attention" icon, text coerced to a string, and an OK button; and sounds the system beep.

alt
dialog.ask

dialog.ask (text, addrResult)

Displays a modal dialog containing text coerced to a string, a Cancel button and an OK button, which is the default. The dialog also contains an editable text field, which initially contains the value at addrResult coerced to a string. Returns false if the user clicks Cancel, true otherwise; if true, the contents of the editable text field are stored at addrResult.

alt
dialog.confirm

dialog.confirm (text)

Displays a modal dialog containing text coerced to a string, a Cancel button and an OK button, which is the default. Returns false if the user clicks Cancel, true otherwise.

alt
dialog.fileInfo

dialog.fileInfo (pathname)

Displays a modal file information dialog about the file at pathname ; if no such file exists, an error is raised.

alt
dialog.getInt

dialog.getInt (text, addrResult)

Displays a modal dialog containing text coerced to a string, a Cancel button and an OK button, which is the default. The dialog also contains an editable text field, which initially contains the value at addrResult coerced to a string. Returns false if the user clicks Cancel, true otherwise; if true, the contents of the editable text field are coerced to a short (raising an error if this is impossible) and stored at addrResult.

alt
dialog.getValue

dialog.getValue (itemNum)

Used in the proc of a resource-based dialog (it is a runtime error to use it in any other context), returns the value of the item of the dialog whose item number is itemNum. The value of a checkbox or radio button is a boolean. The value of a text item is the text, as a string. The value of a button is its title, as a string. Certain miscellaneous controls, such as a scrollbar, have a value which is a short.

alt
dialog.hideItem

dialog.hideItem (itemNum)

Used in the proc of a resource-based dialog (it is a runtime error to use it in any other context), makes invisible the item of the dialog whose item number is itemNum.

alt
dialog.loadFromFile

dialog.loadFromFile (pathname)

Loads from the file at pathname into the resource fork of the database the first 'DLOG' and 'DITL' whose ID is greater than or equal to 25000, plus all other resources whose ID is greater than or equal to 25000. Returns the ID of the 'DLOG'.

alt
dialog.notify

dialog.notify (text)

Displays a modal dialog containing a "chat" icon, text coerced to a string, and an OK button.

alt
dialog.run

dialog.run (resourceID, defaultItemNum, addrProc)

Displays a resource-based modal dialog. resourceID is the ID of a 'DLOG' resource already in the resource chain. defaultItemNum specifies the item number of the default item in the dialog (to be "hit" automatically when the user hits Enter or Return); typically, this is 1. addrProc specifies the address of the handler to be called as the proc for the dialog.

alt
dialog.runFromFile

dialog.runFromFile (pathname, defaultItemNum, addrProc)

Displays a modal dialog whose resources are file-based, by calling dialog.loadFromFile() and dialog.run().

alt
dialog.runModeless

dialog.runModeless (resourceID, defaultItemNum, addrProc)

Displays a resource-based modal dialog. resourceID is the ID of a 'DLOG' resource already in the resource chain. defaultItemNum specifies the item number of the default item in the dialog (to be "hit" automatically when the user hits Enter or Return); typically, this is 1. addrProc specifies the address of the handler to be called as the proc for the dialog.

alt
dialog.setItemEnable

dialog.setItemEnable (itemNum, enabled?)

Used in the proc of a resource-based dialog (it is a runtime error to use it in any other context), makes enabled or disabled the item of the dialog whose item number is itemNum, depending on whether enabled? is true or false.

alt
dialog.setValue

dialog.setValue (itemNum, newValue)

Used in the proc of a resource-based dialog (it is a runtime error to use it in any other context), sets to newValue the value of the item of the dialog whose item number is itemNum. The value of a checkbox or radio button is a boolean. The value of a text item is the text, as a string. The value of a button is its title, as a string. Certain miscellaneous controls, such as a scrollbar, have a value that is a short.

alt
dialog.showItem

dialog.showItem (itemNum)

Used in the proc of a resource-based dialog (it is a runtime error to use it in any other context), makes visible the item of the dialog whose item number is itemNum.

alt
dialog.threeWay

dialog.threeWay (text, yesButton, noButton, cancelButton)

Displays a modal dialog containing text coerced to a string, a button that says cancelButton, a button that says noButton, and a button that says yesButton, which is the default. Returns 3, 2, or 1 respectively, depending on which button the user clicks.

alt
dialog.twoWay

dialog.twoWay (text, OKbutton, cancelButton)

Displays a modal dialog containing text coerced to a string, a button that says cancelButton, and a button that says OKbutton, which is the default. Returns false if the user clicks the cancelButton, true otherwise.

alt
dialog.yesNo

dialog.yesNo (text)

Displays a modal dialog containing text coerced to a string, a No button and a Yes button, which is the default. Returns false if the user clicks No, true otherwise.

alt
dialog.yesNoCancel

dialog.yesNoCancel (text)

Displays a modal dialog containing text coerced to a string, a Cancel button, a No button, and a Yes button, which is the default. Returns 3, 2, or 1 respectively, depending on which button the user clicks.

alt
editMenu.clear

editMenu.clear ()

Like choosing Clear from the Edit menu. Operates on the current target.

alt
editMenu.copy

editMenu.copy ()

Like choosing Copy from the Edit menu. Operates on the current target.

alt
editMenu.cut

editMenu.cut ()

Like choosing Cut from the Edit menu. Operates on the current target.

alt
editMenu.paste

editMenu.paste ()

Like choosing Paste from the Edit menu. Operates on the current target.

alt
editMenu.plainText

editMenu.plainText ()

Removes all text styling from the current selection in the wptext target window.

alt
editMenu.selectAll

editMenu.selectAll ()

Like choosing Select All from the Edit menu. Operates on the current target; if a wptext or in content mode, selects the whole wptext "document," otherwise selects all lines of the outline at the same level as the current selection. In a table edit window, switches to content mode.

alt
editMenu.setBold

editMenu.setBold (boolean)

Turns bold text styling on or off, depending on boolean, for the current selection in the wptext target window.

alt
editMenu.setFont

editMenu.setFont (nameString)

Like choosing the font called nameString from the Font submenu of the Edit menu. Operates on the current target.

alt
editMenu.setFontSize

editMenu.setFontSize (sizeInteger)

Like choosing the font size sizeInteger from the Size submenu of the Edit menu. Operates on the current target.

alt
editMenu.setItalic

editMenu.setItalic (boolean)

Turns italic text styling on or off, depending on boolean, for the current selection in the wptext target window.

alt
editMenu.setOutline

editMenu.setOutline (boolean)

Turns outline text styling on or off, depending on boolean, for the current selection in the wptext target window.

alt
editMenu.setShadow

editMenu.setShadow (boolean)

Turns shadow text styling on or off, depending on boolean, for the current selection in the wptext target window.

alt
editMenu.setUnderline

editMenu.setUnderline (boolean)

Turns underline text styling on or off, depending on boolean, for the current selection in the wptext target window.

alt
file.bytesInFolder

file.bytesInFolder (folderPathname)

Returns the total number of bytes occupied by all files in the folder at folderPathname.

alt
file.bytesOnVolume

file.bytesOnVolume (volumePathname)

Returns the number of occupied bytes in the volume at volumePathname.

alt
file.close

file.close (pathname)

Closes the file at pathname, ending a read/write access session. Returns false if the file is not open; raises an error if the file does not exist.

alt
file.compare

file.compare (pathname1, pathname2)

Returns a boolean reporting whether the dataforks of the files at pathname1 and pathname2 are identical.

alt
file.copy

file.copy (source, dest)

Copies the file or folder at source to a new location, maintaining creation and modification dates for copied material. If source is a folder, its contents, not the folder itself, are copied into dest, which must be a folder. If dest is a folder, what is being copied is copied into it; the whole dest pathname must denote existing folders, except that if source is a folder, the last element of dest will be created if it doesn't exist. If dest is a file, then source must be a file. Copied files replace existing files with the same name.

alt
file.copyDataFork

file.copyDataFork (source, dest)

Creates a new file at dest (replacing an existing file) that is identical to the file at source without its resource fork.

alt
file.copyResourceFork

file.copyResourceFork (source, dest)

Creates a new file at dest (replacing an existing file) that is identical to the file at source without its data fork.

alt
file.copyToSystemFolder

file.copyToSystemFolder (source)

A utility script which simulates dropping the file or folder source onto the system folder's icon, copying it into its proper subfolder if it is a file of special type, and otherwise copying it into the system folder itself.

alt
file.countLines

file.countLines (pathname)

Returns the number of end-of-lines (cr) in the file at pathname, which should not be opened beforehand. (If the file is opened beforehand, returns 0 if any reading has been done this session.)

alt
file.countVolumes

file.countVolumes ()

Returns the number of volumes currently mounted.

alt
file.created

file.created (pathname)

Returns the creation date of the file or folder at pathname.

alt
file.creator

file.creator (pathname)

Returns the string4 creator code of the file at pathname.

alt
file.delete

file.delete (pathname)

Deletes the file or empty folder at pathname. An error is raised if the item at pathname is a folder with contents, or is locked or "busy" (open for use by some application).

alt
file.deleteFolder

file.deleteFolder (pathname)

Deletes the folder at pathname even if it has contents.

alt
file.eject

file.eject (volumePathname)

Tries to eject the volume at volumePathname. This is not the same as unmounting the volume. Returns false if the volume is not ejectable.

alt
file.endOfFile

file.endOfFile (pathname)

Returns false if on the next command it would be possible to read at least one character from the file at pathname using file.read(); true is returned if the file is not open or does not exist.

alt
file.exists

file.exists (pathname)

Returns a boolean reporting whether the file, folder or volume at pathname exists.

alt
file.fileFromPath

file.fileFromPath (pathname)

Returns the last element of the pathname string pathname.

alt
file.filesInFolder

file.filesInFolder (folderPathname, depth)

Returns the total number of files and folders in the folder at folderPathname, to depth depth.

alt
file.filesOnVolume

file.filesOnVolume (volumePathname)

Returns the number of files and folders, including invisible files and folders, in the volume at volumePathname.

alt
file.filteredCopy

file.filteredCopy (source, dest, addrProc)

Selectively copies the file or folder at source to a new location. A utility script. The basic mechanics are identical to file.copy(); in fact, file.copy() is simply a script that calls file.filteredCopy() with a proc that always returns true. The proc, a handler pointed to by addrProc, must take a single parameter, a pathname, and return true or false as that file should or should not be copied. If the proc says a folder isn't to be copied, its contents are never tested.

alt
file.findApplication

file.findApplication (string4)

Returns the pathname of the application associated with the string4 creator code string4. The volumes are searched beginning with the startup volume. The search ends when a volume containing the application is found. If that volume contains more than one instance of the application, the pathname of the more recent instance of the application is returned.

alt
file.findInFile

file.findInFile (pathname, whatToLookFor)

whatToLookFor is coerced to a string, and if it appears in the file at pathname (which need not be opened beforehand), true is returned, false otherwise. If pathname doesn't exist, an error is raised.

alt
file.findInFolder

file.findInFolder (folderPathname, depth, whatToLookFor)

whatToLookFor is coerced to a string, and if it appears in some file in the folder at folderPathname, searching to depth depth, returns the pathname of the first such file encountered; otherwise, returns the empty string.

alt
file.folderFromPath

file.folderFromPath (pathname)

Returns all but the last element of the pathname string pathname.

alt
file.foldersInFolder

file.foldersInFolder (folderPathname, depth)

Returns the total number of folders in the folder at folderPathname, to depth depth.

alt
file.foldersOnVolume

file.foldersOnVolume (volumePathname)

Returns the number of folders, including invisible folders, in the volume at volumePathname.

alt
file.followAlias

file.followAlias (pathname)

Returns the pathname of the original of the alias file at pathname. If what's at pathname is not an alias, returns the empty string. If there is nothing at pathname, a very weird error is raised.

alt
file.freespaceOnVolume

file.freespaceOnVolume (volumePathname)

Returns the number of free bytes in the volume at volumePathname.

alt
file.getComment

file.getComment (pathname)

Returns the comment string of the file or folder at pathname.

alt
file.getDiskDialog

file.getDiskDialog (text, addrResult)

Displays a modal dialog permitting the user to choose a volume, including prompt text ("" for no prompt), a Cancel button, and an Open button. The volume initially displayed may be set by supplying a pathname at addrResult. Returns false if the user clicks Cancel, true otherwise. If true, the pathname of the chosen volume is stored at addrResult.

alt
file.getFileDialog

file.getFileDialog (text, addrResult, fileTypes)

Displays the Mac OS StandardGetFile modal dialog, permitting the user to choose a file, including prompt text ("" for no prompt), a Cancel button, and an Open button. fileTypes specifies what types of file are listed; it may be a string4 type designator or a list of such type designators, or 0 to show all files. The directory (and file) initially displayed may be set by supplying a pathname at addrResult. Returns false if the user clicks Cancel, true otherwise. If true, the pathname of the chosen file is stored at addrResult.

alt
file.getFolderDialog

file.getFolderDialog (text, addrResult)

Displays a modified Mac OS StandardGetFile modal dialog, permitting the user to choose a folder, including prompt text ("" for no prompt), a Cancel button, an Open button, and a button to choose the presently selected folder. The directory initially displayed may be set by supplying a pathname at addrResult. Returns false if the user clicks Cancel, true otherwise. If true, the pathname of the chosen folder is stored at addrResult.

alt
file.getFullVersion

file.getFullVersion (pathname)

Returns the full version string of the file at pathname.

alt
file.getIconPos

file.getIconPos (pathname, addrHoriz, addrVert)

Stores at addrHoriz and addrVert the components of the icon position of the file or folder at pathname.

alt
file.getLabel

file.getLabel (pathname)

Returns the label of the file or folder at pathname.

alt
file.getPath

file.getPath ()

Returns the current pathname prefix, which is automatically prefixed to a one-element file pathname string when it is resolved as a fileSpec.

alt
file.getSpecialFolderPath

file.getSpecialFolderPath (volumePathname, folder, create?)

Returns the pathname of any system folder's standard subfolders. Values for folder are: "Apple", "Control", "Desktop", "Extensions", "Fonts", "Preferences", "PrintMonitor", "Startup", "System", "Temp", "Trash". The folder is sought on the volume designated by volumePathname. If there is no system folder on that volume, an error is raised. If the requested folder doesn't exist, it is created if create? is true, otherwise an error is raised.

alt
file.getSystemDisk

file.getSystemDisk ()

Returns the pathname of the startup volume.

alt
file.getSystemFolderPath

file.getSystemFolderPath ()

Returns the pathname of the active system folder.

alt
file.getVersion

file.getVersion (pathname)

Returns the version string of the file at pathname.

alt
file.isAlias

file.isAlias (pathname)

Returns a boolean reporting whether the file at pathname is an alias. If no such file exists, an error is raised.

alt
file.isBusy

file.isBusy (pathname)

Returns a boolean reporting whether the file at pathname is "busy" (open for use by an application).

alt
file.isEjectable

file.isEjectable (volumePathname)

Returns a boolean reporting whether the volume at volumePathname is ejectable, like a floppy disk or a CD.

alt
file.isFolder

file.isFolder (pathname)

Returns a boolean reporting whether the file at pathname is a folder (or volume). If no such file exists, an error is raised.

alt
file.isLocked

file.isLocked (pathname)

Returns a boolean reporting whether the file or folder at pathname is locked.

alt
file.isVisible

file.isVisible (pathname)

Returns a boolean reporting whether the file or folder at pathname is visible.

alt
file.isVolume

file.isVolume (pathname)

Returns a boolean reporting whether pathname designates a volume. If no such item exists, an error is raised.

alt
file.lock

file.lock (pathname)

Locks the file or folder at pathname.

alt
file.modified

file.modified (pathname)

Returns the modification date of the file or folder at pathname.

alt
file.mountServerVolume

file.mountServerVolume (path, userID, password)

Attempts to mount the remote volume path, which is of the form " zone: machineID: volName"; to signify the local zone, "*" may be used for the zone. Returns true if the volume was successfully mounted; if the server was not found, or an invalid userID and password were provided, an error is raised. For guest login, supply the empty string ("") as the userID and password.

alt
file.move

file.move (source, destFolder)

Moves the file or folder at source into destFolder, which must be an existing folder on the same volume as source, and must not contain a file or folder with the same name as source.

alt
file.new

file.new (pathname)

Creates a new file at pathname ; if there is already a file or empty folder at pathname it is deleted first. The new file has type and creator codes '????', and no data. All elements of pathname except the last must exist.

alt
file.newAlias

file.newAlias (original, dest)

Creates at dest an alias of the file, folder or volume at original. Everything but the last element of dest must exist. If there is already a file or folder at dest, an error is raised.

alt
file.newFolder

file.newFolder (pathname)

Creates at pathname a new empty folder. Everything but the last element of pathname must exist. If there is already a file or folder at pathname, an error is raised.

alt
file.open

file.open (pathname)

Opens the file at pathname for read/write access, beginning a session. An error is raised if the file couldn't be opened.

alt
file.putFileDialog

file.putFileDialog (text, addrResult)

Displays the Mac OS StandardPutFile modal dialog, permitting the user to specify a folder and supply a filename, including prompt text ("" for "Save as:"), an editable text field, a New Folder button, a Cancel button, and a Save button. Any folders the user creates with the New Folder button are actually created. The directory initially displayed and the initial contents of the editable text field may be set by supplying a pathname at addrResult. Returns false if the user clicks Cancel, true otherwise. If the designated file already exists, a secondary name-conflict dialog appears, and true is not returned unless Replace is clicked. If true, the pathname of the specified file is stored at addrResult ; it will not be an existing folder or an illegal pathname.

alt
file.read

file.read (pathname, howManyCharacters)

Reads characters from the file at pathname ; returns a binary consisting of the characters read, or false if the file is not open. The read starts after the end of the previous read during the present session, or at the beginning of the file if there was no previous read. If howManyCharacters is too large, then if howManyCharacters is infinity the file is read to the end, but otherwise the read fails, false is returned, and further reading in this session becomes impossible (because the pointer is now at end-of-file).

alt
file.readLine

file.readLine (pathname)

Reads characters from the file at pathname ; returns a string (not a binary!) consisting of the characters read, or the empty string if the file is not open. The read starts after the end of the previous read during the present session, or at the beginning of the file if there was no previous read. The read continues until end-of-line is encountered (cr); the position pointer is moved past the end-of-line, but the end-of-line is not included in the returned string. If end-of-file is encountered, text is read successfully; but if the read starts at end-of-file, the empty string is returned.

alt
file.rename

file.rename (pathname, nameString)

Renames the file or folder or volume at pathname, giving it the name nameString, which should be just the new name, not a pathname.

alt
file.setComment

file.setComment (pathname, commentString)

Sets to commentString the comment string of the file or folder at pathname.

alt
file.setCreated

file.setCreated (pathname, date)

Sets to date the creation date of the file or folder at pathname.

alt
file.setCreator

file.setCreator (pathname, string4)

Sets to string4 the string4 creator code of the file at pathname.

alt
file.setFullVersion

file.setFullVersion (pathname, versionString)

Sets to versionString the full version string of the file at pathname.

alt
file.setIconPos

file.setIconPos (pathname, horiz, vert)

Sets to horiz and vert the components of the icon position of the file or folder at pathname.

alt
file.setLabel

file.setLabel (pathname, labelString)

Sets to labelString the label of the file or folder at pathname. labelString must match one of the labels registered in the Labels control panel, or nothing will happen.

alt
file.setModified

file.setModified (pathname, date)

Sets to date the modification date of the file or folder at pathname.

alt
file.setPath

file.setPath (pathString)

Sets the current pathname prefix to pathString, which must be the full pathname of an existing volume or folder. The change remains in force until Frontier is quit. The pathname prefix is automatically prefixed to a one-element file pathname string when it is resolved as a fileSpec.

alt
file.setType

file.setType (pathname, string4)

Sets to string4 the string4 type code of the file at pathname.

alt
file.setVersion

file.setVersion (pathname, versionString)

Sets to versionString the version string of the file at pathname.

alt
file.setVisible

file.setVisible (pathname, visible?)

Sets the visibility of the file or folder at pathname according to the boolean visible?.

alt
file.size

file.size (pathname)

Returns the logical size of the file at pathname, the total bytes of the file's resource fork and data fork combined.

alt
file.sureFolder

file.sureFolder (pathname)

Creates at pathname a new empty folder. Everything but the last element of pathname must exist. If there is already a file or folder at pathname, nothing happens.

alt
file.type

file.type (pathname)

Returns the string4 type code of the file at pathname.

alt
file.unlock

file.unlock (pathname)

Unlocks the file or folder at pathname.

alt
file.unmountVolume

file.unmountVolume (volumePathname)

Tries to unmount the volume at volumePathname. The volume may be an ejectable medium or a remote volume. Stronger than file.eject(), which ejects the physical medium but retains the volume information. If the volume cannot be unmounted (because it contains files in use, for example), an error is raised.

alt
file.visitFolder

file.visitFolder (folderPathString, depth, addrProc)

The script or handler pointed to by addrProc must take one parameter, which will be a reference to each file or folder in the folder denoted by folderPathString, recursing to the depth indicated by the integer depth; it must return a boolean saying whether it wants to be called again. File and folders in a folder are passed before that folder.

alt
file.volumeBlockSize

file.volumeBlockSize (volumePathname)

Returns the block size, in bytes, of the volume at volumePathname.

alt
file.volumeFromPath

file.volumeFromPath (pathname)

Returns the first element of the pathname string pathname.

alt
file.volumeSize

file.volumeSize (volumePathname)

Returns the total number of bytes in the volume at volumePathname.

alt
file.write

file.write (pathname, whatToWrite)

Coerces whatToWrite to a binary and appends it to the file at pathname. The file is implicitly opened and closed, but it is well to call file.open() and file.close() anyway. Raises an error if the file does not exist or is a folder; but certain conditions (for example, the file is busy) will return false without raising an error, so it may be wise to check the result as well.

alt
file.writeLine

file.writeLine (pathname, whatToWrite)

Same as file.write() except that whatToWrite is first coerced to a string and cr is appended to it.

alt
filemenu.close

filemenu.close ()

Closes the frontmost window.

alt
filemenu.closeAll

filemenu.closeAll ()

Closes all open windows, not including the Main Window, unless the Main Window is frontmost.

alt
filemenu.new

filemenu.new (pathname)

Creates a new minimal database at pathname, and opens it as a second database. If there is already a file or empty folder at pathname, it is deleted first.

alt
filemenu.open

filemenu.open (pathname)

Opens the file at pathname. The effect is as if the file's icon had been dropped onto Frontier's icon; if the file is of a type that belongs to Frontier, it is also the same as if the file had been opened from the Finder. So, a packed object will be imported, a desktop script will be run, a second database will be opened, a HyperCard stack will have its XCMDs imported, and so on.

alt
filemenu.save

filemenu.save ()

Saves the database.

alt
filemenu.saveCopy

filemenu.saveCopy (pathname)

Saves the database in compact form to a file at pathname.

alt
finderflags.clear

finderflags.clear (pathname, whichBit)

Clears the Finder flag whichBit of the file or folder at pathname.

alt
finderflags.get

finderflags.get (pathname, whichBit)

Returns a boolean reporting whether the Finder flag whichBit of the file or folder at pathname is set.

alt
finderflags.set

finderflags.set (pathname, whichBit)

Sets the Finder flag whichBit of the file or folder at pathname.

alt
frontier.bringToFront

frontier.bringToFront ()

Brings Frontier to the front.

alt
frontier.enableAgents

frontier.enableAgents (boolean)

Starts or stops the agent thread, depending on the value of boolean.

alt
frontier.getFilePath

frontier.getFilePath ()

Returns the pathname of the database that owns the frontmost window within Frontier.

alt
frontier.getProgramPath

frontier.getProgramPath ()

Returns the pathname of the Frontier application.

alt
frontier.idleTime

frontier.idleTime ()

Returns the number of seconds the user has been "idle," meaning that no keys are pressed, no mouse action takes place, and no disks are inserted. Requires that the idleTime extension2 be loaded at system startup.

alt
frontier.requestToFront

frontier.requestToFront ([text])

Sounds a beep; if text is supplied, it appears in an alert dialog in the frontmost application. Then, pauses until the user manually brings Frontier to the front.

alt
frontier.version

frontier.version ()

Returns the version string of the database.

alt
kb.cmdKey

kb.cmdKey ()

Returns a boolean which is true if the Command key is down.

alt
kb.controlKey

kb.controlKey ()

Returns a boolean which is true if the Control key is down.

alt
kb.optionKey

kb.optionKey ()

Returns a boolean which is true if the Option key is down.

alt
kb.shiftKey

kb.shiftKey ()

Returns a boolean which is true if the Shift key is down.

alt
launch.anything

launch.anything (pathname)

Brings the Finder to the front, and "opens" the object designated by pathname just as the Finder would do. The object can be a document, an application file, a folder - anything that can be opened in this sense.

alt
launch.appleMenu

launch.appleMenu (name)

Looks for name (case-sensitive) in the Apple menu, and chooses it.

alt
launch.application

launch.application (pathname)

Starts up the application at pathname. Faster and more sophisticated than launch.anything(). Does not bring the Finder or the application to the front. Returns true or false as the application was started up successfully. If the application was already running, returns true immediately.

alt
launch.appWithDocument

launch.appWithDocument (appPathname, docPathname)

Starts up the application at appPathname with the document at docPathname. Works like launch.application(). If the application was already running, returns true, but the document is not opened. If docPathname is the empty string, launches the application with no default document, but further programmatic interaction with the application may be impossible until a document is opened.

alt
launch.controlPanel

launch.controlPanel (name)

Looks for name in the Control Panels folder, and calls launch.anything() on that item.

alt
launch.resource

launch.resource (typeString4, IDnumber)

Runs the code resource of type typeString4 and ID IDnumber; primarily intended to run an FKEY (typeString4 will be 'FKEY').

alt
launch.usingID

launch.usingID (string4)

Starts up an application given its creator code, string4. A utility script; not recommended, because it calls launch.anything().

alt
loginAs.loginAs

loginAs.loginAs (userID, password)

Causes userID and password to be in force whenever a remote application is subsequently addressed through program linking. If the values are correct, prevents the Link To dialog from appearing.

alt
mainWindow.hideButtons

mainWindow.hideButtons ()

Hides the lower half of the Main Window.

alt
mainWindow.hideFlag

mainWindow.hideFlag ()

Hides the flag icon in the Main Window.

alt
mainWindow.hidePopup

mainWindow.hidePopup ()

Hides the agent popup menu triangle in the Main Window.

alt
mainWindow.showButtons

mainWindow.showButtons ()

Shows the lower half of the Main Window.

alt
mainWindow.showFlag

mainWindow.showFlag ()

Shows the flag icon in the Main Window.

alt
mainWindow.showPopup

mainWindow.showPopup ()

Shows the agent popup menu triangle in the Main Window.

alt
menu.addMenuCommand

menu.addMenuCommand (addrMenubar, menuName, itemName, 
                       scriptString)

Modifies the menubar object at addrMenubar by adding an item itemName with a one-line script scriptString as the last subhead of the item menuName ; if menuName doesn't exist, it will be created at summit level after everything else in the menubar. If itemName exists already as a subhead of menuName, then scriptString simply replaces its script.

alt
menu.addSubMenu

menu.addSubMenu (addrDestMenubar, menuName,

addrSourceMenubar)

Copies the first summit-level item (call its name firstSummit) of the menubar object at addrSourceMenubar into the menubar object at addrDestMenubar, as a subhead of the item menuName, replacing an existing subhead named firstSummit, or, if no such subhead exists, after all subheads of menuName. If no item menuName exists, it is created at summit level after everything else in the menubar.

alt
menu.addSuite

menu.addSuite (addrSuiteTable)

Removes all suite menus and calls the installMenu() script in the table at addrSuiteTable.

alt
menu.clearMenubar

menu.clearMenubar ()

Removes all custom menus from the top of the screen.

alt
menu.deleteMenuCommand

menu.deleteMenuCommand (addrMenubar, menuName, itemName)

Deletes from the menubar at addrMenubar the item itemName which is a subhead of menuName. If the item itemName has subheads, or if itemName or menuName does not exist, does nothing, returning false.

alt
menu.deleteSubMenu

menu.deleteSubMenu (addrMenubar, menuName)

Deletes from the menubar at addrMenubar the item menuName, including its subheads, if it has any. If menuName does not exist, does nothing, returning false.

alt
menu.getScript

menu.getScript (addrObject)

Sets the value of the object at addrObject to the script of the currently selected item of the menubar edit window which is the current target.

alt
menu.install

menu.install (addrMenubar)

Adds the menubar at addrMenubar to the top of the screen after all custom menus and before the Window menu. If that menubar is already present at the top of the screen, does nothing.

alt
menu.isInstalled

menu.isInstalled (addrMenubar)

Returns true or false as the menubar at addrMenubar is present at the top of the screen.

alt
menu.noSuite

menu.noSuite ()

Restores the default custom menus at the top of the screen (no suite menus).

alt
menu.remove

menu.remove (addrMenubar)

Removes the menubar at addrMenubar from the top of the screen. If that menubar is not already present at the top of the screen, does nothing and returns false.

alt
menu.setScript

menu.setScript (addrScriptObject)

Sets the script of the currently selected item of the menubar edit window which is the current target to the value of the object at addrScriptObject. If that object is not a script, does nothing and returns false.

alt
menu.toggle

menu.toggle (addrMenubar)

Calls menu.install() or menu.remove(), depending on the result of menu.isInstalled().

alt
menu.zoomscript

menu.zoomscript ()

Opens the script edit window of the currently selected item of the menubar edit window that is the current target.

alt
mouse.button

mouse.button ()

Returns a boolean which is true if the mouse button is down.

alt
mouse.location

mouse.location ()

Returns a pointType giving the location of the cursor measured in pixels from the top left corner of the frontmost window.

alt
op.collapse

op.collapse ()

Collapses the subheads of the currently selected line of the outline (or script, or menubar) target window.

alt
op.countSubs

op.countSubs (depth)

Returns the number of subheads, to a depth of depth, of the currently selected line of the outline (or script, or menubar) target window. For example, supplying a depth of 1 returns the number of immediate subheads; supplying a depth of infinity returns the total number of lines subordinate at any depth. The current state of expansion is irrelevant.

alt
op.countSummits

op.countSummits ()

Returns the number of summit lines in the outline (or script, or menubar) target window.

alt
op.dehoist

op.dehoist ()

In the outline (or script, or menubar) target window, undoes the effect of the most recent op.hoist() that has not yet been undone.

alt
op.dehoistAll

op.dehoistAll ()

In the outline (or script, or menubar) target window, undoes the effect of every op.hoist().

alt
op.deleteLine

op.deleteLine ()

Deletes the currently selected line of the outline (or script, or menubar) target window. If the selection was the n th line of its bundle, the selection afterwards is the n th line of its bundle, unless there is no n th line anymore, in which case it is the (n - 1)th line of its bundle, unless there are no lines in the bundle anymore, in which case it is the line to which the bundle was subordinate. The mode is unchanged; if it was content mode, the insertion point is at the end of the selected line.

alt
op.deleteSubs

op.deleteSubs ()

Deletes the subheads of the currently selected line of the outline (or script, or menubar) target window.

alt
op.demote

op.demote ()

Moves to the right all lines below and in the same bundle as the currently selected line of the outline (or script, or menubar) target window.

alt
op.expand

op.expand (depth)

Expands the subheads of the currently selected line of the outline (or script, or menubar) target window, revealing at most depth new levels. Returns true if any new levels were revealed.

alt
op.firstSummit

op.firstSummit ()

Like saying op.go(flatup,infinity).

alt
op.flatCursorKeys

op.flatCursorKeys (boolean)

Sets whether up arrow and down arrow keys in outline (or script, or menubar) edit windows should cause movement flatup and flatdown, or up and down among siblings, according to whether boolean is true or false; changes certain other navigation key combinations as well. Reinitialized to false at startup.

alt
op.fullCollapse

op.fullCollapse ()

Collapses all non-summit lines of the outline (or script, or menubar) target window.

alt
op.fullExpand

op.fullExpand ()

Expands all lines of the outline (or script, or menubar) target window.

alt
op.getCursor

op.getCursor ()

Returns a number which can be used later to select again the currently selected line of the outline (or script, or menubar) target window.

alt
op.getDisplay

op.getDisplay ()

Returns a boolean which is false if display updating in the target outline (or script, or menubar) edit window is currently frozen.

alt
op.getLineText

op.getLineText ()

Returns the text of the current line of the outline (or script, or menubar) target window.

alt
op.getRefCon

op.getRefCon ()

Returns the "secret" scalar value of the currently selected line of the outline (or script) target window.

alt
op.go

op.go (dir, count)

Navigates the selection relative to the currently selected line of the outline (or script, or menubar) target window, count times in the direction dir, which can be up, down, left, right, flatup, flatdown, or nodirection. Movement is with regard to the current state of expansion. Returns false only if it is impossible to navigate in the specified direction at all; otherwise, returns true and navigates either count times or, if that's impossible, as many times as possible. Puts the window in selection mode.

alt
op.hoist

op.hoist ()

Causes the subheads of the currently selected line of the outline (or script, or menubar) target window to appear as the outline's summits. The effect lasts until undone with op.dehoist() or op.dehoistAll(), or until the database is saved with the window closed, or until Frontier is quit.

alt
op.insert

op.insert (string, dir)

Creates a new line whose text is string, adjacent to the currently selected line of the outline (or script, or menubar) target window in the direction dir, which can be up, down, left, or right. If that's impossible (for example, left is specified when a summit-level line is selected), false is returned and nothing happens. The mode is unchanged: if selection mode, the new line is selected; if content mode, the insertion point is at the end of the new line.

alt
op.insertAtEndOfList

op.insertAtEndOfList (string)

Creates a new line whose text is string, as the last subhead of the currently selected line of the outline (or script, or menubar) target window, selecting the new line in selection mode.

alt
op.level

op.level ()

Returns an integer representing the level of the currently selected line of the outline (or script, or menubar) target window. Summit lines are at level 1.

alt
op.promote

op.promote ()

Moves to the left all immediate subheads of the currently selected line of the outline (or script, or menubar) target window.

alt
op.reorg

op.reorg (dir, count)

Moves the currently selected line of the outline (or script, or menubar) target window count times in the direction dir, which can be up, down, left, or right (like hitting Command-u, Command-d, Command-l, or Command-r, respectively, count times). If dir is right, subheads will be expanded if necessary. Returns false only if the line cannot be moved in the specified direction at all; otherwise, returns true and moves the line either count times or, if that's impossible, as many times as possible. Does not alter the mode or (if content mode) the selection within the line.

alt
op.setCursor

op.setCursor (bookmarkNum)

When bookmarkNum is the result of an earlier call to op.getCursor(), selects (in selection mode) the line of the outline (or script, or menubar) target window that was selected when op.getCursor() was called, regardless of how that line has been collapsed, moved, or cut and pasted, within the same outline. If the line has been deleted, returns false.

alt
op.setDisplay

op.setDisplay (boolean)

If boolean is false, freezes display updating in the target outline (or script, or menubar) edit window until the window is closed or until reset with boolean being true.

alt
op.setLineText

op.setLineText (string)

Sets the text of the current line of the outline (or script, or menubar) target window to string, selecting the line in selection mode.

alt
op.setRefCon

op.setRefCon (scalarValue)

Sets to scalarValue the "secret" value of the currently selected line of the outline (or script) target window.

alt
op.sort

op.sort ()

ASCII-sorts the lines in the same bundle as the currently selected line of the outline (or script, or menubar) target window. In selection mode, the selection travels with its line. (In content mode, it is unpredictable what line will contain the selection afterwards.)

alt
op.subsExpanded

op.subsExpanded ()

Returns a boolean reporting whether or not the immediate subheads of the currently selected line of the outline (or script, or menubar) target window are expanded.

alt
op.tabKeyReorg

op.tabKeyReorg (boolean)

Sets whether Tab and Shift-Tab in outline edit windows move a line rightward and leftward, or type text, according as boolean is true or false. Reinitialized to true at startup.

alt
op.visit

op.visit (addrProc)

An outline (or script, or menubar) must already be the target. The subheads of the currently selected line, each followed by its subheads (and so on), will be selected in turn, and the script or handler pointed to by addrProc will be called; it must take no parameters, and must return a boolean saying whether it wants to be called again.

alt
op.wipe

op.wipe ()

Deletes all lines of the outline (or script, or menubar) target window, leaving a single empty summit line.

alt
passwordDialog.run

passwordDialog.run (addrName, addrPassword)

Displays a modal dialog containing prompt text, a Cancel button and an OK button, which is the default. The dialog also contains two labelled editable text fields; the first initially contains the value at addrName coerced to a string. Characters typed into the second text field are displayed as bullets. Returns false if the user clicks Cancel, true otherwise; if true, the contents of the editable text fields are stored at addrName and addrPassword, respectively (unencrypted). The prompt and the text field labels can be customized by calling a modified version of the script.

alt
pbs.getLinks

pbs.getLinks (string)

Returns a list of all the href parameter values of <a> tags in string.

alt
pbs.stripHTML

pbs.stripHTML (string)

Returns string stripped of all HTML tags.

alt
pbs.utilities.parseRelativeURL

pbs.utilities.parseRelativeURL (baseURL, relativeURL)

Returns the absolute URL of the entity denoted by relativeURL relative to baseURL, in accordance with RFC 1808.

alt
pict.expressions

pict.expressions (boolean)

Sets whether or not the Frontier picture whose edit window is currently the target should have its text expressions evaluated. If the target is not a Frontier picture edit window, an error is raised.

alt
pict.getPicture

pict.getPicture (addrBinaryPICT)

Stores at addrBinaryPICT a binary of internal datatype 'PICT' converted from the Frontier picture whose edit window is presently the target. If the target is not a Frontier picture edit window, an error is raised.

alt
pict.PICTtoPicture

pict.PICTtoPicture (addrBinaryPICT, addrPicture)

Stores at addrPicture a Frontier picture object converted from the binary of internal datatype 'PICT' at addrBinaryPICT.

alt
pict.pictureToPICT

pict.pictureToPICT (addPicture, addrBinaryPICT)

Stores at addrBinaryPICT a binary of internal datatype 'PICT' converted from the Frontier picture object at addrPicture.

alt
pict.scheduleUpdate

pict.scheduleUpdate (seconds)

Sets the interval at which the Frontier picture object whose edit window is currently the target should have its text expressions evaluated. If the target is not a Frontier picture edit window, an error is raised.

alt
pict.setPicture

pict.setPicture (binaryPICTvalue)

Stores in the object whose edit window is presently the target a Frontier picture converted from the binary of internal datatype 'PICT' binaryPICTvalue. If the target is not a Frontier picture edit window, an error is raised.

alt
point.get

point.get (pt, addrX, addrY)

Separates the point pt into its x- and y-components and places them in the objects at addrX and addrY, respectively.

alt
point.set

point.set (x, y)

Returns the point whose x- and y-components are the shorts x and y.

alt
rectangle.get

rectangle.get (rect, addrTop, addrLeft, addrBottom,

addrRight)

Separates the rect rect into its top, left, bottom, and right components and places them in the objects at addrTop, addrLeft, addrBottom, and addrRight, respectively.

alt
rectangle.inset

rectangle.inset (rect, widthDelta, heightDelta)

Returns the rect whose left and right are each widthDelta closer to the center of rect and whose top and bottom are each heightDelta closer to the center of rect.

alt
rectangle.outset

rectangle.outset (rect, widthDelta, heightDelta)

Returns the rect whose left and right are each widthDelta farther from the center of rect and whose top and bottom are each heightDelta farther from the center of rect.

alt
rectangle.random

rectangle.random (top, left, bottom, right)

Returns a pseudo-random rect falling within top, left, bottom, and right.

alt
rectangle.set

rectangle.set (top, left, bottom, right)

Returns the rect whose top, left, bottom, and right components are the shorts top, left, bottom, and right.

alt
regex.extract

regex.extract (searchFor, addrString, addrList, [groups,
               caseSensitive?])

Creates at addrList a list of the substrings in the string at addrString matching the grep expression searchFor. The optional parameters default to {0} and false respectively; the use of groups is too complicated to detail here (see the regex documentation).

alt
regex.join

regex.join (delimString, addrList)

Returns a string made up of the strings in the list of strings at addrList interspersed with delimString.

alt
regex.split

regex.split (searchFor, addrString, [caseSensitive?])

Returns a list of strings which are the pieces of the string at addrString when all substrings matched by the grep expression searchFor have been removed; the list also includes the strings matching any group expressions in searchFor. caseSensitive? defaults to false.

alt
regex.subst

regex.subst (searchFor, replaceWith, addrString,
             [caseSensitive?, maxSubstitutions])

Returns a string which is the result of searching in the string at addrString for the grep expression searchFor and replacing it with replaceWith. Or, replaceWith can be the address of a script or handler which generates the replacement string. The optional parameters default to false and infinity, respectively.

alt
rez.countResources

rez.countResources (pathname, type)

Returns the number of resources of type type in the file at pathname. If there is no file at pathname, an error is raised.

alt
rez.countResTypes

rez.countResTypes (pathname)

Returns the number of different resource types in the file at pathname. If there is no file at pathname, an error is raised.

alt
rez.deleteNamedResource

rez.deleteNamedResource (pathname, type, name)

Attempts to delete the resource in the file at pathname of type type and name name, returning a boolean reporting whether the action succeeded. If there is no file at pathname, an error is raised.

alt
rez.deleteResource

rez.deleteResource (pathname, type, ID)

Attempts to delete the resource in the file at pathname of type type and ID ID, returning a boolean reporting whether the action succeeded. If there is no file at pathname, an error is raised.

alt
rez.getNamedResource

rez.getNamedResource (pathname, type, name,

addrDestination)

Returns true or false, as the file at pathname does indeed have a resource of type type and name name; if true, stores that resource's data as a binary at addrDestination. If there is no file at pathname, an error is raised.

alt
rez.getNthResInfo

rez.getNthResInfo (pathname, type, n, addrID, addrName)

Returns true or false, as the file at pathname does indeed have an nth resource of type type. If true, stores that resource's ID number at addrID, and stores either the empty string or that resource's name if it has one at addrName. If there is no file at pathname, an error is raised.

alt
rez.getNthResource

rez.getNthResource (pathname, type, n, addrName,

addrDestination)

Returns true or false, as the file at pathname does indeed have an nth resource of type type. If true, stores that resource's data as a binary at addrDestination, and stores either the empty string or that resource's name if it has one at addrName. If there is no file at pathname, an error is raised.

alt
rez.getNthResType

rez.getNthResType (pathname, n, addrDestination)

Returns true or false, as the file at pathname does indeed have an nth resource type; if true, stores the string4 designator for that type at addrDestination. If there is no file at pathname, an error is raised.

alt
rez.getResource

rez.getResource (pathname, type, ID, addrDestination)

Returns true or false, as the file at pathname does indeed have a resource of type type and ID ID; if true, stores that resource's data as a binary at addrDestination. If there is no file at pathname, an error is raised.

alt
rez.getResourceAttributes

rez.getResourceAttributes (pathname, type, ID)

Returns the short representing the attributes of the resource of type type and ID ID in the file at pathname. If the file or the resource doesn't exist, an error is raised.

alt
rez.getStringResource

rez.getStringResource (pathname, ID, addrDestination)

Returns true or false, as the file at pathname does indeed have a resource of type 'STR ' and ID ID; if true, converts that resource's data to a string at addrDestination. If there is no file at pathname, an error is raised.

alt
rez.namedResourceExists

rez.namedResourceExists (pathname, type, name)

Returns a boolean reporting whether the file at pathname contains a resource of type type and name name. If there is no file at pathname, an error is raised.

alt
rez.putNamedResource

rez.putNamedResource (pathname, type, name, addrSource)

Stores the binary at addrSource into the file at pathname as a resource of type type and name name, replacing an existing resource if necessary and supplying a unique ID otherwise. If there is no file at pathname, an error is raised.

alt
rez.putResource

rez.putResource (pathname, type, ID, addrSource)

Stores the binary at addrSource into the file at pathname as a resource of type type and ID ID, replacing an existing resource if necessary. If there is no file at pathname, an error is raised.

alt
rez.putStringResource

rez.putStringResource (pathname, ID, theString)

Converts the string theString (not an address!) to a Pascal string and stores it into the file at pathName as a resource of type 'STR ' and ID ID, replacing an existing resource if necessary. If there is no file at pathname, an error is raised.

alt
rez.resourceExists

rez.resourceExists (pathname, type, ID)

Returns a boolean depending on whether the file at pathname contains a resource of type type and ID ID. If there is no file at pathname, an error is raised.

alt
rez.setResourceAttributes

rez.setResourceAttributes (pathname, type, ID, theShort)

Sets the short representing the attributes of the resource of type type and ID ID in the file at pathname to theShort. If the file or the resource doesn't exist, an error is raised.

alt
rgb.get

rgb.get (rgb, addrRed, addrGreen, addrBlue)

Separates the rgb rgb into its red, green, and blue components and places them in the objects at addrRed, addrGreen, and addrBlue, respectively.

alt
rgb.set

rgb.set (red, green, blue)

Returns the rgb whose red, green, and blue components are the shorts red, green, and blue.

alt
script.clearBreakpoint

script.clearBreakpoint ()

Clears a breakpoint at the currently selected line of the script (or outline, or menubar) target window.

alt
script.compile

script.compile (addrScriptObject)

Compiles the script object at addrScriptObject.

alt
script.getBreakpoint

script.getBreakpoint ()

Returns a boolean reporting whether the currently selected line of the script (or outline, or menubar) target window is a breakpoint.

alt
script.getLanguage

script.getLanguage (addrScriptObject)

Returns the OSA dialect of the script object at addrScriptObject, typically "UserTalk" or "AppleScript".

alt
script.isComment

script.isComment ()

Returns a boolean reporting whether the currently selected line of the script (or outline, or menubar) target window is a comment.

alt
script.makeComment

script.makeComment ()

Turns the currently selected line of the script (or outline, or menubar) target window into a comment.

alt
script.removeSource

script.removeSource (addrScriptObject)

Clears the source code from the script object at addrScriptObject, converting it to a compiled code object.

alt
script.setBreakpoint

script.setBreakpoint ()

Sets a breakpoint at the currently selected line of the script (or outline, or menubar) target window.

alt
script.setLanguage

script.setLanguage (addrScriptObject, languageString)

Sets the OSA dialect of the script object at addrScriptObject to languageString, which is typically "UserTalk" or "AppleScript".

alt
script.unComment

script.unComment ()

Turns the currently selected line of the script (or outline, or menubar) target window into a non-comment.

alt
script.uncompile

script.uncompile (addrScriptObject)

Clears from memory the explicitly compiled version of the script object at addrScriptObject.

alt
semaphores.lock

semaphores.lock (name, timeOutTicks)

Checks to see whether the semaphore name is registered as locked; if so, waits until it is unlocked (or, if timeOutTicks elapses first, throws an error). If and when name is not locked, locks it.

alt
semaphores.unlock

semaphores.unlock (name)

Unlocks the semaphore name. It is not an error if no such semaphore is locked.

alt
speaker.beep

speaker.beep ()

Plays the system alert sound.

alt
speaker.ouch

speaker.ouch ()

Plays a brief, high-pitched "blip" sound.

alt
speaker.playNamedSound

speaker.playNamedSound (name)

Plays a 'snd ' resource called name, which must be in the resource chain already.

alt
speaker.sound

speaker.sound (duration, amplitude, frequency)

Plays a customized square-wave sound.

alt
stack.create

stack.create ()

Creates an empty stack and returns its address.

alt
stack.dispose

stack.dispose (addrStack)

Releases the database storage occupied by the stack pointed to by addrStack.

alt
stack.pop

stack.pop (addrStack)

Pops the topmost value off the stack pointed to by addrStack, and returns it. If the stack is empty, a runtime error is generated.

alt
stack.push

stack.push (addrStack, value)

Pushes value onto the stack pointed to by addrStack.

alt
stack.visit

stack.visit (addrStack, addrProc)

The script or handler pointed to by addrProc must take one parameter, which will be the value of each item on the stack at addrStack in turn, and must return a boolean saying whether it wants to be called again.

alt
string.addCommas

string.addCommas (number)

Returns a string representation of number with commas appropriately inserted.

alt
string.commentDelete

string.commentDelete (string)

Assuming that string is a line of a script, returns everything in it except the trailing comment, if any.

alt
string.countFields

string.countFields (string, delimiterChar)

Returns the number of fields in string when the delimiter character is delimiterChar.

alt
string.countWords

string.countWords (string)

Returns the number of words in string, given the current word-delimiter.

alt
string.dateString

string.dateString ()

Returns the system's abbrevDate string representation of the current date.

alt
string.delete

string.delete (string, startIndex, count)

Returns a string consisting of string with count characters removed starting at index startIndex of string. It is not an error for count to be too large: all of string starting at index startIndex is removed. It is not an error for startIndex to be too large: none of string is removed. If count is 0 or startIndex is 0, none of string is removed.

alt
string.filledString

string.filledString (character, length)

Returns a string made up of length occurrences of character.

alt
string.firstSentence

string.firstSentence (string)

Returns everything in string up to and including the first full stop which is followed by a space, or string itself if this is not found.

alt
string.firstWord

string.firstWord (string)

Returns the first word of string, given the current word-delimiter.

alt
string.getWordChar

string.getWordChar ()

Returns the current word-delimiter.

alt
string.hex

string.hex (integer)

Returns a hexadecimal string representation of integer, in four or eight digits. integer is coerced to an integer if necessary.

alt
string.insert

string.insert (substring, originalString, startIndex)

Returns a string consisting of originalString with substring inserted into it starting at index startIndex of the result.

alt
string.isAlpha

string.isAlpha (character)

On Mac OS, returns true if character is in the ASCII ranges 65-90, 97-122, 128-159, 174-175, 190-191, 203-207, 216-217, 229-239, or 241-245.

alt
string.isNumeric

string.isNumeric (character)

Returns true if character is a digit.

alt
string.iso8859encode

string.iso8859encode (string)

Returns a string made up of the characters of string, each character, if high-ASCII, having been passed through a translate table - the table at user.html.prefs.iso8859map if there is one, a default hard-coded table otherwise.

alt
string.isPunctuation

string.isPunctuation (character)

Returns true if character is in the ASCII ranges 33-47 or 58-63.

alt
string.kBytes

string.kBytes (integer)

Returns a string ending in K representing the smallest integral number of kilobytes larger than integer bytes. (That is, integer is divided by 1024 and rounded up.)

alt
string.lastWord

string.lastWord (string)

Returns the last word of string, given the current word-delimiter.

alt
string.lower

string.lower (string)

Returns string with every character rendered to its lowercase equivalent in accordance with the system's definitions. Bug: if string is longer than about 32000 characters, string is returned unchanged.

alt
string.memAvailString

string.memAvailString ()

Returns memAvail() integer-divided by 1024, coerced to a string ending with "K"; generally differs from string.kBytes(memAvail()) by 1.

alt
string.mid

string.mid (string, startIndex, count)

Returns a string consisting of count characters of string starting at index startIndex of string. It is not an error for count to be too large: all of string starting at index startIndex is returned. It is not an error for startIndex to be too large: the empty string is returned. If count is 0 or negative, the empty string is returned. If startIndex is 0, it is translated to 1.

alt
string.nthChar

string.nthChar (string, index)

Returns the char at index index of string; or, if index is 0 or too large, returns the empty string.

alt
string.nthField

string.nthField (string, delimiterChar, n)

Returns the n th field of string when the delimiter character is delimiterChar; if n is too large or 0, returns the empty string.

alt
string.nthWord

string.nthWord (string, n)

Returns the nth word of string, given the current word-delimiter.

alt
string.parseHTTPargs

string.parseHTTPargs (string)

Assuming that string is of the form "name1=value1&name2=value2...", returns a list of strings of the form {"name1", "value1", "name2", "value2"...}, where all strings are URL-decoded.

alt
string.patternMatch

string.patternMatch (substring, string)

Returns the index of the first occurrence of substring in string, or 0 if it doesn't occur.

alt
string.popLeading

string.popLeading (string, character)

Returns a string made from string with any occurrences of character removed from its start.

alt
string.popTrailing

string.popTrailing (string, character)

Returns a string made from string with any occurrences of character removed from its end.

alt
string.replace

string.replace (string, oldSubstring, newSubstring)

Returns a string consisting of string with the first occurrence of oldSubstring replaced by newSubstring. If newSubstring is "", the first occurrence of oldSubstring is removed.

alt
string.replaceAll

string.replaceAll (string, oldSubstring, newSubstring)

Returns a string consisting of string with all occurrences of oldSubstring replaced by newSubstring. If newSubstring is "", all occurrences of oldSubstring are removed.

alt
string.setWordChar

string.setWordChar (character)

Set the word-delimiter to character.

alt
string.timeString

string.timeString ()

Returns the system's string representation of the current time.

alt
string.upper

string.upper (string)

Returns string with every character rendered to its uppercase equivalent in accordance with the system's definitions. Bug: if string is longer than about 32000 characters, string is returned unchanged.

alt
string.URLdecode

string.URLdecode (string)

Returns string with %-octet codes and + replaced by the characters they represent.

alt
string.URLencode

string.URLencode (string)

Returns string with URL-illegal characters replaced by their %-encoded form.

alt
sys.appIsRunning

sys.appIsRunning (processIdentifier)

Returns a boolean reporting whether the application processIdentifier is running.

alt
sys.bringAppToFront

sys.bringAppToFront (processIdentifier)

Brings the application processIdentifier to the front. If processIdentifier is not a running process, returns false and does nothing. If processIdentifier is a faceless background application, an error is raised.

alt
sys.browseNetwork

sys.browseNetwork (text, creatorCode, addrResult)

Displays the Mac OS PPCBrowser modal dialog, permitting the user to choose a process running on this computer or any computer on the AppleTalk network with program linking turned on. The prompt is text, or, if "" is passed, "Choose a program to link to:"; the dialog has a Cancel button and an OK button, which is the default. creatorCode can be a string4 creator designator to specify one application, or 0 to allow all applications to appear. Returns false if the user clicks Cancel, true otherwise. If true, a 'targ' binary specifying the chosen process is stored at addrResult; this binary may be used as an application ID in an appleEvent() call.

alt
sys.countApps

sys.countApps ()

Returns the number of running processes, including faceless background applications that do not appear in the system's Application menu.

alt
sys.frontmostApp

sys.frontmostApp ()

Returns the name of the frontmost application.

alt
sys.getAppPath

sys.getAppPath (processIdentifier)

Returns the pathname of the application file running as processIdentifier.

alt
sys.getAppSize

sys.getAppSize (pathname)

Returns the preferred RAM allocation for the application at pathname, as shown in the Finder's Get Info window.

alt
sys.getMinAppSize

sys.getMinAppSize (pathname)

Returns the minimum RAM allocation for the application at pathname, as shown in the Finder's Get Info window.

alt
sys.getNthApp

sys.getNthApp (n)

Returns the name of the n th running process, including faceless background applications that do not appear in the system's Application menu; the order is the order in which the processes were started up.

alt
sys.hasBundle

sys.hasBundle (pathname)

Returns a boolean reporting whether the file at pathname has its bundle bit set.

alt
sys.memAvail

sys.memAvail ()

Returns the amount of free RAM memory.

alt
sys.OSVersion

sys.OSVersion ()

Returns the system's version string.

alt
sys.setAppSize

sys.setAppSize (pathname, bytes)

Sets to bytes the preferred RAM allocation for the application at pathname, as shown in the Finder's Get Info window. If the application is running, an error is raised. If the file at pathname is not an application, returns false and does nothing.

alt
sys.setBundle

sys.setBundle (pathname, set?)

Sets the bundle bit of the file at pathname according to the boolean set?.

alt
sys.setMinAppSize

sys.setMinAppSize (pathname, bytes)

Sets to bytes the minimum RAM allocation for the application at pathname, as shown in the Finder's Get Info window. If the application is running, an error is raised. If the file at pathname is not an application, returns false and does nothing.

alt
sys.systemTask

sys.systemTask ()

Yields time to other processes.

alt
table.assign

table.assign (addrObject, value)

Sets the value of the object at addrObject to value, possibly creating the object if it doesn't exist.

alt
table.copy

table.copy (addrObject, addrTable)

Copies the object at addrObject into the table at addrTable. The new object's name and value are the same as those of the object at addrObject. If there is not a table at addrTable, an error is raised.

alt
table.copyContents

table.copyContents (addrSourceTable, addrDestTable)

Calls table.copy() on each entry of the table at addrSourceTable().

alt
table.emptyTable

table.emptyTable (addrTable)

Destroys all the entries in the table at addrTable. Returns the number of objects deleted. If addrTable does not point to a table, a runtime error is raised.

alt
table.getCursor

table.getCursor ()

Returns the address of the currently selected entry of the target table window.

alt
table.go

table.go (dir, count)

Navigates the selection within the target table window relative to the current selection, count times in the direction dir, which can be up or down (or nodirection). If count is infinity, moves to the start or end of the table and returns true; otherwise makes no move unless the move requested is possible, and returns true or false reporting whether it was possible.

alt
table.goto

table.goto (n)

Selects the nth entry of the target table window. If there is no nth entry, no move is made and false is returned.

alt
table.gotoAddress

table.gotoAddress (addrObject)

Calls edit() on the parent table of the object at addrObject, then calls table.gotoName() so that object's entry is selected in the edit window.

alt
table.gotoName

table.gotoName (nameString)

Selects the entry named nameString in the target table window. If there is no such entry, no move is made and false is returned.

alt
table.move

table.move (addrObject, addrTable)

Copies the object at addrObject into the table at addrTable, and deletes the object at addrObject. The new object's name and value are the same as those of the object at addrObject. If there is not a table at addrTable, an error is raised.

alt
table.moveAndRename

table.moveAndRename (addrSourceObject, addrDestObject)

Assigns to the object at addrDestObject (creating it if necessary) the value of the object at addrSourceObject, and destroys the object at addrSourceObject.

alt
table.moveContents

table.moveContents (addrSourceTable, addrDestTable)

Calls table.move() on each entry of the table at addrSourceTable().

alt
table.promptNewItem

table.promptNewItem (newWhat, dataType)

A table edit window must be the target, or an error will result. Displays a modal dialog with prompt text asking for the name of a new cell of type newWhat with "new" removed from it, an editable text field initially containing newWhat, a Cancel button and an OK button, which is the default. Returns false if the user clicks Cancel, true otherwise; if true, an object of type dataType whose name is the contents of the editable text field is created in the target table.

alt
table.rename

table.rename (addrObject, nameString)

Changes the name of the object at addrObject to nameString.3 If addrObject is a legal address but there is no such object, returns false and does nothing.

alt
table.sortBy

table.sortBy (byWhat)

Sorts the entries in the target table window according to byWhat, which must be "name", "value", or "kind".

alt
table.surePath

table.surePath (string)

Creates in the database all nonexistent tables in the object path string, which must not be a partial reference (only "root" should be omitted). Returns the number of tables created.

alt
table.uniqueName

table.uniqueName (startOfName, addrTable)

Returns the address of a nonexistent entry of the table at addrTable whose name starts with startOfName and ends with a number.

alt
table.validate

table.validate (addrTable)

Checks the internal consistency of the table at addrTable.

alt
table.visit

table.visit (addrTable, addrProc)

The script or handler pointed to by addrProc must take one parameter, which will be the address of the table at addrTable and then the address of each of its entries, a subtable being passed before its entries, to infinite depth; it must return a boolean saying whether it wants to be called again.

alt
target.clear

target.clear ()

Explicitly returns to the default target situation; if the target's edit window was invisible, also closes it.

alt
target.get

target.get ()

Returns the address of the object which is the target (contrast window.frontmost() which returns a string), or the empty string if there is no target.

alt
target.set

target.set (addrObject)

Explicitly declares the non-scalar object at addrObject to be the target; if the object's edit window is not open, opens it invisibly. (If the object's edit window is already open, neither its visibility nor its position in the layering order are changed.) If the object at addrObject is a scalar, returns false and does nothing.

alt
thread.evaluate

thread.evaluate (string)

Initiates evaluation of string as a UserTalk expression in a new thread and returns the ID of that thread.

alt
thread.evaluateTo

thread.evaluateTo (string, addrDatabaseEntry)

Initiates evaluation of string as a UserTalk expression in a new thread and returns the ID of that thread; when the thread concludes, its result will be stored in the database at addrDatabaseEntry.

alt
thread.exists

thread.exists (ID)

Returns a boolean according as a thread whose ID is ID exists or not.

alt
thread.getCurrentID

thread.getCurrentID ()

Returns the ID number of the thread within which the call is made.

alt
thread.getNthID

thread.getNthID (n)

Returns the ID number of the n th thread, or 0 if n is greater than the number of threads.

alt
thread.isSleeping

thread.isSleeping (ID)

Returns a boolean reporting whether the thread whose ID is ID is sleeping or not. It is an error if no such thread exists.

alt
thread.kill

thread.kill (ID)

Aborts the thread whose ID number is ID. It is an error if there is no such thread.

alt
thread.sleep

thread.sleep (ID)

Puts to sleep the thread whose ID number is ID ; the thread pauses until it is told to resume with thread.wake(). It is an error if there is no such thread.

alt
thread.sleepFor

thread.sleepFor (seconds)

Puts to sleep the thread within which the verb is called; the thread pauses for seconds seconds or until it is told to resume with thread.wake(), whichever comes first.

alt
thread.wake

thread.wake (ID)

Awakens the thread whose ID is ID. It is an error if there is no such thread. It is not an error if the thread was not asleep.

alt
toys.alphaChar

toys.alphaChar (character)

Returns true if character is a non-diacritic letter, a digit, or underscore.

alt
toys.commentDelete

toys.commentDelete (string)

Returns the first field of string where « is the delimiter character.

alt
toys.dropNonAlphas

toys.dropNonAlphas (string)

Returns string stripped of any character which is not a non-diacritic letter or digit.

alt
toys.emptyFolder

toys.emptyFolder (pathname)

Deletes the contents of the folder at pathname. A utility script which calls file.delete() and file.deleteFolder(). Does not raise an error or return false if pathname doesn't exist.

alt
toys.getCursorAddress

toys.getCursorAddress ()

If window.frontmost() is not an edit window, raises an error. Otherwise, if it is not a table, returns the address of the object whose edit window it is; if it is a table, returns the address of the entry selected within it.4

alt
toys.innerCaseName

toys.innerCaseName (string)

Returns string processed as follows: it is translated to lowercase, and then stripped of spaces, with the character after each removal translated to uppercase.

alt
toys.listToOutline

toys.listToOutline (list, addrOutline)

Converts the list list to an outline and inserts it into the outline at addrOutline starting down from the currently selected line.

alt
toys.outlineToList

toys.outlineToList (addrOutline)

Returns a list of strings (and lists), reflecting the currently selected line of the outline at addrOutline, and all lines below it in the same bundle, and all subheads of these to an infinite depth.

alt
toys.padWithZeros

toys.padWithZeros (theNumber, length)

Returns a string of length length made up of zeros followed by theNumber coerced to a string; or, if theNumber is already longer than length, returns theNumber.

alt
toys.popStringSuffix

toys.popStringSuffix (string, [character])

Returns a string consisting of string with the rightmost instance of character and everything after it removed. The default for character is ".".

alt
toys.puncChar

toys.puncChar (character)

Returns true on Mac OS if character is in the ASCII ranges 33-47, 58-64, 91-96, 123-126, 160-173, 176-189, 192-202, 208-215, 218-228, 240, or 246-254.

alt
toys.readFileIntoTextObject

toys.readFileIntoTextObject (pathname, addrDestination)

Creates or replaces an object at addrDestination, to be a wptext consisting of the data of the file at pathname.

alt
toys.readWholeFile

toys.readWholeFile (pathname)

Returns a binary consisting of the data of the file at pathname.

alt
toys.sureFilePath

toys.sureFilePath (pathname)

Creates all nonexistent folders in the pathname pathname.

alt
toys.threadCall

toys.threadCall (verbNameString, paramList)

Calls the verb named in verbNameString, handing it as parameters the values in the list paramList, in a new thread and returns the ID of that thread.

alt
toys.touchPath

toys.touchPath (pathname)

Sets to clock.now() the modification date of the file or folder at pathname, and that of all its enclosing folders.

alt
toys.uniqueTableName

toys.uniqueTableName (startOfName, addrTable, numberOfDigits)

Just like table.uniqueName(), but the number appended to startOfName is numberOfDigits long, so the resulting names will sort properly.

alt
toys.URLsplit

toys.URLsplit (string)

Assuming string is a URL, returns a list of three strings: the URL scheme name prefix, which must be present; the domain (not ending in a slash); and the path within the domain.

alt
toys.writeWholeFile

toys.writeWholeFile (pathname, data, type, creator, date)

Coerces data to a binary and writes it out as a file at pathname,5 giving the file type and creator codes type and creator (which are string4s) and a creation date of date.

alt
trigCmd

trigCmd.abs (number)
trigCmd.acos (number)
trigCmd.asin (number)
trigCmd.atan (number)
trigCmd.ceil (number)
trigCmd.cos (number)
trigCmd.cosh (number)
trigCmd.exp (number)
trigCmd.floor (number)
trigCmd.log (number)
trigCmd.log10 (number)
trigCmd.sin (number)
trigCmd.sinh (number)
trigCmd.sqrt (number)
trigCmd.tan (number)
trigCmd.tanh (number)

Standard mathematical functions.

alt
window.bringToFront

window.bringToFront (windowReference)

Brings to the front and makes visible the window referred to by windowReference. Returns false if windowReference does not resolve to an open window.

alt
window.close

window.close (windowReference)

Closes the window referred to by windowReference. Returns false if windowReference does not resolve to an open window, or if the window is the Main Window.

alt
window.dbStats

window.dbStats ()

Puts up a windoid reporting some statistics relevant to the state of the database.

alt
window.frontmost

window.frontmost ()

Returns a string reference to the frontmost visible window; or, if called from a script initiated with its edit window's Run or Debug button, the first visible window behind that window. Returns the empty string if there is no such window.

alt
window.getPosition

window.getPosition (windowReference, addrX, addrY)

Puts the screen coordinates of the top-left of the content area of the window referred to by windowReference into the objects at addrX and addrY. Returns false if windowReference does not resolve to an open window.

alt
window.getSize

window.getSize (windowReference, addrWidth, addrHeight)

Puts the width and height of the content area of the window referred to by windowReference into the objects at addrWidth and addrHeight. Returns false if windowReference does not resolve to an open window.

alt
window.getTitle

window.getTitle (windowReference)

Returns the title of the window referred to by windowReference, or the empty string if windowReference does not resolve to an open window.

alt
window.hide

window.hide (windowReference)

Makes the window referred to by windowReference invisible. Returns false if windowReference does not resolve to an open window.

alt
window.isFront

window.isFront (windowReference)

Returns true or false as window.frontmost() returns a reference to the window referred to by windowReference.

alt
window.isHidden

window.isHidden (windowReference)

Returns false or true as windowReference refers to an open visible window.

alt
window.isMenuScript

window.isMenuScript (windowReference)

Returns true or false as windowReference refers to an open menu item script window.

alt
window.isModified

window.isModified (addrObject)

Returns a boolean reporting whether there is an object at addrObject which is a non-scalar that is dirty. Supplying a parameter of "root" reveals whether the database is dirty.

alt
window.isOpen

window.isOpen (windowReference)

Returns true or false reporting whether windowReference refers to an open window.

alt
window.isVisible

window.isVisible (windowReference)

Returns true or false reporting whether windowReference refers to an open visible window.

alt
window.msg

window.msg (string)

Posts string (coerced to a string) to the status message area of the window that is actually frontmost, if it has one. The message remains until overwritten by another message, or erased with window.msg(""), or the window is closed.

alt
window.next

window.next (windowReference)

Returns a string reference to the window (visible or invisible) behind the window referred to by windowReference, or the empty string if windowReference does not resolve to an open window or has no window behind it.

alt
window.open

window.open (addrObject)

Opens, and makes visible and frontmost, the edit window of the non-scalar object at addrObject. Returns false if this object is a scalar.

alt
window.quickScript

window.quickScript ()

Opens and brings to the front the Quick Script window.

alt
window.scroll

window.scroll (direction, count)

Scrolls the target window as if by clicking, count times, the scroll arrow that moves the window's content in the direction direction. Returns true if the window was scrolled at all.

alt
window.sendToBack

window.sendToBack (windowReference)

Sends to the back the window referred to by windowReference. Returns false if windowReference does not resolve to an open window.

alt
window.setModified

window.setModified (addrObject, dirty?)

If the object at addrObject is a non-scalar, sets the object's dirtiness to the boolean dirty?. Supplying a parameter of "root" sets the dirtiness of the database.

alt
window.setPosition

window.setPosition (windowReference, X, Y )

Positions the window referred to by windowReference so that the screen coordinates of the top-left of its content area are X and Y, curtailing the values of X and Y if necessary just enough to prevent any part of the window from being offscreen. Returns false if windowReference does not resolve to an open window.

alt
window.setSize

window.setSize (windowReference, width, height)

Sets the width and height of the content area of the window referred to by windowReference to width and height, curtailing the values of width and height if necessary just enough to prevent either from being larger than the visible dimension of the screen, or smaller than a reasonable minimum. Returns false if windowReference does not resolve to an open window.

alt
window.setTitle

window.setTitle (windowReference, newTitle)

Sets the title of the window referred to by windowReference to newTitle. Returns false if windowReference does not resolve to an open window.

alt
window.show

window.show (windowReference)

Makes the window referred to by windowReference visible. Returns false if windowReference does not resolve to an open window.

alt
window.visit

window.visit (addrProc)

The script or handler pointed to by addrProc must take one parameter, which will be a reference to each open window in front-to-back order, and must return a boolean saying whether it wants to be called again.

alt
window.zoom

window.zoom (windowReference)

Equivalent to clicking the zoom button in the window referred to by windowReference.

alt
wp.clearTabs

wp.clearTabs ()

Clears all tabs in all paragraphs containing any of the current selection in the wptext target window.

alt
wp.getDisplay

wp.getDisplay ()

Returns a boolean which is false if display updating in the target wptext (or content mode) edit window is currently frozen.

alt
wp.getIndent

wp.getIndent ()

Returns the first-line indent, measured in pixels from the left edge, of the current selection in the wptext target window; or returns -1 if the selection includes text with different indents.

alt
wp.getLeftMargin

wp.getLeftMargin ()

Returns the left margin, measured in pixels from the left edge, of the current selection in the wptext target window; or returns -1 if the selection includes text with different left margins.

alt
wp.getRightMargin

wp.getRightMargin ()

Returns the right margin, measured in pixels from the right edge (the end of the ruler), of the current selection in the wptext target window; or, returns -1 if the selection includes text with different right margins.

alt
wp.getRuler

wp.getRuler ()

Returns a boolean reporting whether the ruler is visible in the wptext target window.

alt
wp.getSelect

wp.getSelect (addrStart, addrEnd)

Stores at addrStart and addrEnd the positions of the start and end, respectively, of the target window's current selection. These positions are integers measured by counting characters from the start of the "document": the start is 0; between the first and second character is 1; and so forth. The target window must be a wptext or in content mode.

alt
wp.getSelText

wp.getSelText ()

Returns the text (as a string) of the current selection in the target window. The target window must be a wptext or in content mode.

alt
wp.getText

wp.getText ()

Returns the text of the entire "document" in the target window. If the target is not a wptext, this means the current line or cell. The target window must be a wptext or in content mode.

alt
wp.go

wp.go (dir, count)

Moves the insertion point in the target window relative to its present position (and, in a wptext, scrolls to reveal the insertion point). dir can be left, right, up or down (or nodirection). Movement left or right starts at the left or right end of the current selection, respectively. If count is too large, movement is to the start or end. If the target is not a wptext, movement up or down goes to the start or end. Returns true if any movement was possible. The target window must be a wptext or in content mode.

alt
wp.insert

wp.insert (string)

Inserts string into the target window according to the same rules as typing or pasting: if there is a selection, it is replaced; otherwise, the text appears after the insertion point. Afterwards, the insertion point is after what was just inserted. The target window must be a wptext or in content mode.

alt
wp.inTextMode

wp.inTextMode ()

Returns a boolean reporting whether the target outline, script, table, or menubar window is in selection mode (returns false) or content mode (returns true).

alt
wp.rulerLength

wp.rulerLength ()

Returns the length of the ruler of the wptext target window.

alt
wp.selectLine

wp.selectLine ()

Selects the line containing the end of the current selection in the target window; if the target is not a wptext, this means the whole "document." The target window must be a wptext or in content mode.

alt
wp.selectParagraph

wp.selectParagraph ()

Selects the paragraph containing the end of the current selection in the target window; if the target is not a wptext, this means the whole "document." The target window must be a wptext or in content mode.

alt
wp.selectWord

wp.selectWord ()

Selects the word containing the end of the current selection in the target window. The target window must be a wptext or in content mode.

alt
wp.setDisplay

wp.setDisplay (boolean)

If boolean is false, freezes display updating in the target wptext (or content mode) edit window until the window is closed or until reset with boolean being true.

alt
wp.setIndent

wp.setIndent (pixels)

Sets the first-line indent of all paragraphs containing any of the current selection in the wptext target window, to pixels, measuring in pixels from the left edge. Because of a bug, you should subtract 3 from pixels beforehand.

alt
wp.setJustification

wp.setJustification (justification)

For all paragraphs containing any of the current selection in the wptext target window, sets the justification to justification, which can be 1-4 for left, center, right, and decimal.

alt
wp.setLeftMargin

wp.setLeftMargin (pixels)

Sets the left margin of all paragraphs containing any of the current selection in the wptext target window, to pixels, measuring in pixels from the left edge. Because of a bug, you should subtract 3 from pixels beforehand.

alt
wp.setRightMargin

wp.setRightMargin (pixels)

Sets the right margin of all paragraphs containing any of the current selection in the wptext target window, to pixels, measuring in pixels from the right edge. Because of a bug, you should add 3 to pixels beforehand.

alt
wp.setRuler

wp.setRuler (visible?)

Makes the ruler visible or invisible in the wptext target window, depending on the boolean visible?.

alt
wp.setSelect

wp.setSelect (start, end)

Selects text in the target window starting at position start and ending at position end. These positions are integers measured by counting characters from the start of the "document": the start is 0; between the first and second character is 1; and so forth. If end is too large, the selection will reach to the end. The target window must be a wptext or in content mode.

alt
wp.setSpacing

wp.setSpacing (verticalPixels)

For all paragraphs containing any of the current selection in the wptext target window, sets line spacing. There are 12 vertical pixels to the (nominal) inch; verticalPixels is added to a default value based on the font and size (so supplying 0 restores the default, and supplying a negative value is legal).

alt
wp.setTab

wp.setTab (position, justification, leaderChar)

For all paragraphs containing any of the current selection in the wptext target window, creates a tab at position pixels from the left, whose justification is justification, which can be 1-4 for left, center, right, and decimal, and whose leader character is leaderChar (supply ' ' for no leader character). Because of a bug, you should subtract 3 from position beforehand.

alt
wp.setText

wp.setText (string)

Replaces the text of the entire "document" in the target window with string. If the target is not a wptext, this means the current line or cell. The target window must be a wptext or in content mode.

alt
wp.setTextMode

wp.setTextMode (boolean)

Causes the target outline, script, table, or menubar window to be in selection mode (if boolean is false) or content mode (if boolean is true).

alt
wordInfo.getNthWordOffset

wordInfo.getNthWordOffset (string, n)

Returns the index of the start of the n th word of string.


1. This might be because the designated table doesn't exist, or because the object is the root table, or because the object is a local variable. A bug in Frontier 4.2.3 causes parentOf(x^) to return "root" when x is "root".

2. Included with the Frontier package.

3. A bug allows you to rename a table entry so that its name is the same as that of another entry in the same table, so your script should avoid this by checking explicitly first.

4. This verb is a utility script; because of a bug in the way it is coded, it will break if the target is not window.frontmost().

5. See file.new().


TOP UP: Reference NEXT: Apple Event Suites

This is Frontier: The Definitive Guide by Matt Neuburg, unabridged and unaltered from the January 1998 printing.
It deals with the freeware Frontier 4.2.3; for commercial Frontier 8, look here, and for the inexpensive Radio UserLand, look here. See my Web site for information.
Those wishing an offline or printed copy may purchase the book, which is still in print.
Copyright 1998 O'Reilly & Associates, Inc. ALL RIGHTS RESERVED. Reprinted with permission.