TOP | UP: Reference | NEXT: Apple Event Suites |
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.
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.
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.
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.
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.
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.
delete (addrObject)
If addrObject is an array specifier, removes the specified item from the array. Otherwise, destroys the object at addrObject.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
random (integer1, integer2)
Returns a pseudo-random integer between integer1 and integer2 inclusive.
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.
getBinaryType (addrBinary, string4)
Sets the internal datatype of the binary at addrBinary to string4.
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.
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.
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.
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.
systemEvent (type,subtype,name1,value1,...)
systemEvent (type,subtype,table,...)
systemEvent (type,subtype,record,...)
tableEvent (addrTable,addr,appID,type,subtype,
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.
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.
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.
transactionEvent (appID,type,subtype,transID,
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().
unpack (addrSource, addrDest)
Coerces the binary value at addrSource into that binary's internal type, and stores the result in the object at addrDest.
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.
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.
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.
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.
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.
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.
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.
card.getObjectEnabled (objectName)
Returns a boolean saying whether the object named objectName in the current card is enabled.
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.
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.
card.getObjectVisible (objectName)
Returns a boolean saying whether the object named objectName in the current card is visible.
card.popup.getCheckedItem (objectName)
Returns the number of the currently chosen menu item of the popup menu named objectName in the current card.
card.popup.getHasLabel (objectName)
Returns a boolean saying whether the label of the popup menu named objectName in the current card is visible.
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.
card.popup.getSelectedText (objectName)
Returns the name of the currently chosen menu item of the popup menu named objectName in the current card.
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.
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?.
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.
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.
card.setObjectEnabled (objectName, enabled?)
Enables or disables the object named objectName in the current card, depending on the boolean enabled?.
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.
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.
card.setObjectVisible (objectName, visible?)
Shows or hides the object named objectName in the current card, depending on the boolean visible?.
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'.
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'.
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'.
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.
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.
clock.ticks ()
Returns the number of ticks (approximately sixtieths of a second) that have elapsed since the computer was started up.
clock.waitSixtieths (n)
Pauses for n sixtieths of a second. n is coerced to an integer.
date.abbrevString (date)
Returns the system's abbrevDate string representation of date.
date.dayOfWeek (date)
Returns the day-of-week number for date, where 1 represents Sunday.
date.daysInMonth (date)
Returns the number of days in the month in which date falls.
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.
date.firstOfMonth (date)
Returns the date value for 12:00 midnight on the first day of the month in which date falls.
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.
date.lastOfMonth (date)
Returns the date value for 12:00 midnight on the last day of the month in which date falls.
date.nextMonth (date)
Returns the date resulting from adding 1 to date 's month component.
date.nextWeek (date)
Returns the date resulting from adding 7 to date 's day component.
date.nextYear (date)
Returns the date resulting from adding 1 to date 's year component.
date.prevMonth (date)
Returns the date resulting from subtracting 1 from date 's month component.
date.prevWeek (date)
Returns the date resulting from subtracting 7 from date 's day component.
date.prevYear (date)
Returns the date resulting from subtracting 1 from date 's year component.
date.set (day, month, year, hour, min, sec)
Returns a date constructed from the numeric parameters; they are coerced to integers before use.
date.shortString (date)
Returns the system's shortDate string representation of date.
date.tomorrow (date)
Returns the date resulting from adding 1 to date 's day component.
date.yesterday (date)
Returns the date resulting from subtracting 1 from date 's day component.
db.close (pathname)
Closes, without saving, the database at pathname, which must have been opened with db.open().
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.
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().
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.
db.get (entryPathString)
Called from an AppleScript script, returns the value of the database object named by entryPathString.
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.
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.
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.
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.
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.
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.
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.
db.set (entryPathString, value)
Called from an AppleScript script, sets to value the database object named by entryPathString.
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.
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.
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.
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.
dialog.fileInfo (pathname)
Displays a modal file information dialog about the file at pathname ; if no such file exists, an error is raised.
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.
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.
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.
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'.
dialog.notify (text)
Displays a modal dialog containing a "chat" icon, text coerced to a string, and an OK button.
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.
dialog.runFromFile (pathname, defaultItemNum, addrProc)
Displays a modal dialog whose resources are file-based, by calling dialog.loadFromFile() and dialog.run().
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.
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.
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.
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.
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.
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.
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.
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.
editMenu.clear ()
Like choosing Clear from the Edit menu. Operates on the current target.
editMenu.copy ()
Like choosing Copy from the Edit menu. Operates on the current target.
editMenu.paste ()
Like choosing Paste from the Edit menu. Operates on the current target.
editMenu.plainText ()
Removes all text styling from the current selection in the wptext target window.
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.
editMenu.setBold (boolean)
Turns bold text styling on or off, depending on boolean, for the current selection in the wptext target window.
editMenu.setFont (nameString)
Like choosing the font called nameString from the Font submenu of the Edit menu. Operates on the current target.
editMenu.setFontSize (sizeInteger)
Like choosing the font size sizeInteger from the Size submenu of the Edit menu. Operates on the current target.
editMenu.setItalic (boolean)
Turns italic text styling on or off, depending on boolean, for the current selection in the wptext target window.
editMenu.setOutline (boolean)
Turns outline text styling on or off, depending on boolean, for the current selection in the wptext target window.
editMenu.setShadow (boolean)
Turns shadow text styling on or off, depending on boolean, for the current selection in the wptext target window.
editMenu.setUnderline (boolean)
Turns underline text styling on or off, depending on boolean, for the current selection in the wptext target window.
file.bytesInFolder (folderPathname)
Returns the total number of bytes occupied by all files in the folder at folderPathname.
file.bytesOnVolume (volumePathname)
Returns the number of occupied bytes in the volume at volumePathname.
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.
file.compare (pathname1, pathname2)
Returns a boolean reporting whether the dataforks of the files at pathname1 and pathname2 are identical.
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.
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.
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.
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.
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.)
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).
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.
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.
file.exists (pathname)
Returns a boolean reporting whether the file, folder or volume at pathname exists.
file.filesInFolder (folderPathname, depth)
Returns the total number of files and folders in the folder at folderPathname, to depth depth.
file.filesOnVolume (volumePathname)
Returns the number of files and folders, including invisible files and folders, in the volume at volumePathname.
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.
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.
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.
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.
file.folderFromPath (pathname)
Returns all but the last element of the pathname string pathname.
file.foldersInFolder (folderPathname, depth)
Returns the total number of folders in the folder at folderPathname, to depth depth.
file.foldersOnVolume (volumePathname)
Returns the number of folders, including invisible folders, in the volume at volumePathname.
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.
file.freespaceOnVolume (volumePathname)
Returns the number of free bytes in the volume at volumePathname.
file.getComment (pathname)
Returns the comment string of the file or folder at pathname.
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.
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.
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.
file.getIconPos (pathname, addrHoriz, addrVert)
Stores at addrHoriz and addrVert the components of the icon position of the file or folder at pathname.
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.
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.
file.isAlias (pathname)
Returns a boolean reporting whether the file at pathname is an alias. If no such file exists, an error is raised.
file.isBusy (pathname)
Returns a boolean reporting whether the file at pathname is "busy" (open for use by an application).
file.isEjectable (volumePathname)
Returns a boolean reporting whether the volume at volumePathname is ejectable, like a floppy disk or a CD.
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.
file.isLocked (pathname)
Returns a boolean reporting whether the file or folder at pathname is locked.
file.isVisible (pathname)
Returns a boolean reporting whether the file or folder at pathname is visible.
file.isVolume (pathname)
Returns a boolean reporting whether pathname designates a volume. If no such item exists, an error is raised.
file.modified (pathname)
Returns the modification date of the file or folder at pathname.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
file.setComment (pathname, commentString)
Sets to commentString the comment string of the file or folder at pathname.
file.setCreated (pathname, date)
Sets to date the creation date of the file or folder at pathname.
file.setCreator (pathname, string4)
Sets to string4 the string4 creator code of the file at pathname.
file.setFullVersion (pathname, versionString)
Sets to versionString the full version string of the file at pathname.
file.setIconPos (pathname, horiz, vert)
Sets to horiz and vert the components of the icon position of the file or folder at pathname.
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.
file.setModified (pathname, date)
Sets to date the modification date of the file or folder at pathname.
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.
file.setType (pathname, string4)
Sets to string4 the string4 type code of the file at pathname.
file.setVersion (pathname, versionString)
Sets to versionString the version string of the file at pathname.
file.setVisible (pathname, visible?)
Sets the visibility of the file or folder at pathname according to the boolean visible?.
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.
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.
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.
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.
file.volumeBlockSize (volumePathname)
Returns the block size, in bytes, of the volume at volumePathname.
file.volumeSize (volumePathname)
Returns the total number of bytes in the volume at volumePathname.
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.
file.writeLine (pathname, whatToWrite)
Same as file.write() except that whatToWrite is first coerced to a string and cr is appended to it.
filemenu.closeAll ()
Closes all open windows, not including the Main Window, unless the Main Window is frontmost.
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.
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.
finderflags.clear (pathname, whichBit)
Clears the Finder flag whichBit of the file or folder at pathname.
finderflags.get (pathname, whichBit)
Returns a boolean reporting whether the Finder flag whichBit of the file or folder at pathname is set.
finderflags.set (pathname, whichBit)
Sets the Finder flag whichBit of the file or folder at pathname.
frontier.enableAgents (boolean)
Starts or stops the agent thread, depending on the value of boolean.
frontier.getFilePath ()
Returns the pathname of the database that owns the frontmost window within Frontier.
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.
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.
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.
launch.appleMenu (name)
Looks for name (case-sensitive) in the Apple menu, and chooses it.
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.
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.
launch.controlPanel (name)
Looks for name in the Control Panels folder, and calls launch.anything() on that item.
launch.resource (typeString4, IDnumber)
Runs the code resource of type typeString4 and ID IDnumber; primarily intended to run an FKEY (typeString4 will be 'FKEY').
launch.usingID (string4)
Starts up an application given its creator code, string4. A utility script; not recommended, because it calls launch.anything().
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.
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.
menu.addSubMenu (addrDestMenubar, menuName,
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.
menu.addSuite (addrSuiteTable)
Removes all suite menus and calls the installMenu() script in the table at addrSuiteTable.
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.
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.
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.
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.
menu.isInstalled (addrMenubar)
Returns true or false as the menubar at addrMenubar is present at the top of the screen.
menu.noSuite ()
Restores the default custom menus at the top of the screen (no suite menus).
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.
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.
menu.toggle (addrMenubar)
Calls menu.install() or menu.remove(), depending on the result of menu.isInstalled().
menu.zoomscript ()
Opens the script edit window of the currently selected item of the menubar edit window that is the current target.
mouse.location ()
Returns a pointType giving the location of the cursor measured in pixels from the top left corner of the frontmost window.
op.collapse ()
Collapses the subheads of the currently selected line of the outline (or script, or menubar) target window.
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.
op.countSummits ()
Returns the number of summit lines in the outline (or script, or menubar) target window.
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.
op.dehoistAll ()
In the outline (or script, or menubar) target window, undoes the effect of every op.hoist().
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.
op.deleteSubs ()
Deletes the subheads of the currently selected line of the outline (or script, or menubar) target window.
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.
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.
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.
op.fullCollapse ()
Collapses all non-summit lines of the outline (or script, or menubar) target window.
op.fullExpand ()
Expands all lines of the outline (or script, or menubar) target window.
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.
op.getDisplay ()
Returns a boolean which is false if display updating in the target outline (or script, or menubar) edit window is currently frozen.
op.getLineText ()
Returns the text of the current line of the outline (or script, or menubar) target window.
op.getRefCon ()
Returns the "secret" scalar value of the currently selected line of the outline (or script) target window.
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.
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.
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.
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.
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.
op.promote ()
Moves to the left all immediate subheads of the currently selected line of the outline (or script, or menubar) target window.
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.
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.
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.
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.
op.setRefCon (scalarValue)
Sets to scalarValue the "secret" value of the currently selected line of the outline (or script) target window.
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.)
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.
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.
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.
op.wipe ()
Deletes all lines of the outline (or script, or menubar) target window, leaving a single empty summit line.
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.
pbs.getLinks (string)
Returns a list of all the href parameter values of <a> tags in string.
pbs.utilities.parseRelativeURL (baseURL, relativeURL)
Returns the absolute URL of the entity denoted by relativeURL relative to baseURL, in accordance with RFC 1808.
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.
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.
pict.PICTtoPicture (addrBinaryPICT, addrPicture)
Stores at addrPicture a Frontier picture object converted from the binary of internal datatype 'PICT' at addrBinaryPICT.
pict.pictureToPICT (addPicture, addrBinaryPICT)
Stores at addrBinaryPICT a binary of internal datatype 'PICT' converted from the Frontier picture object at addrPicture.
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.
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.
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.
rectangle.get (rect, addrTop, addrLeft, addrBottom,
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.
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.
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.
rectangle.random (top, left, bottom, right)
Returns a pseudo-random rect falling within top, left, bottom, and right.
rectangle.set (top, left, bottom, right)
Returns the rect whose top, left, bottom, and right components are the shorts top, left, bottom, and right.
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).
regex.join (delimString, addrList)
Returns a string made up of the strings in the list of strings at addrList interspersed with delimString.
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.
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.
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.
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.
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.
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.
rez.getNamedResource (pathname, type, name,
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.
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.
rez.getNthResource (pathname, type, n, 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 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
rgb.set (red, green, blue)
Returns the rgb whose red, green, and blue components are the shorts red, green, and blue.
script.clearBreakpoint ()
Clears a breakpoint at the currently selected line of the script (or outline, or menubar) target window.
script.getBreakpoint ()
Returns a boolean reporting whether the currently selected line of the script (or outline, or menubar) target window is a breakpoint.
script.getLanguage (addrScriptObject)
Returns the OSA dialect of the script object at addrScriptObject, typically "UserTalk" or "AppleScript".
script.isComment ()
Returns a boolean reporting whether the currently selected line of the script (or outline, or menubar) target window is a comment.
script.makeComment ()
Turns the currently selected line of the script (or outline, or menubar) target window into a comment.
script.removeSource (addrScriptObject)
Clears the source code from the script object at addrScriptObject, converting it to a compiled code object.
script.setBreakpoint ()
Sets a breakpoint at the currently selected line of the script (or outline, or menubar) target window.
script.setLanguage (addrScriptObject, languageString)
Sets the OSA dialect of the script object at addrScriptObject to languageString, which is typically "UserTalk" or "AppleScript".
script.unComment ()
Turns the currently selected line of the script (or outline, or menubar) target window into a non-comment.
script.uncompile (addrScriptObject)
Clears from memory the explicitly compiled version of the script object at addrScriptObject.
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.
semaphores.unlock (name)
Unlocks the semaphore name. It is not an error if no such semaphore is locked.
speaker.playNamedSound (name)
Plays a 'snd ' resource called name, which must be in the resource chain already.
stack.dispose (addrStack)
Releases the database storage occupied by the stack pointed to by addrStack.
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.
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.
string.addCommas (number)
Returns a string representation of number with commas appropriately inserted.
string.commentDelete (string)
Assuming that string is a line of a script, returns everything in it except the trailing comment, if any.
string.countFields (string, delimiterChar)
Returns the number of fields in string when the delimiter character is delimiterChar.
string.countWords (string)
Returns the number of words in string, given the current word-delimiter.
string.dateString ()
Returns the system's abbrevDate string representation of the current date.
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.
string.filledString (character, length)
Returns a string made up of length occurrences of character.
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.
string.firstWord (string)
Returns the first word of string, given the current word-delimiter.
string.hex (integer)
Returns a hexadecimal string representation of integer, in four or eight digits. integer is coerced to an integer if necessary.
string.insert (substring, originalString, startIndex)
Returns a string consisting of originalString with substring inserted into it starting at index startIndex of the result.
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.
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.
string.isPunctuation (character)
Returns true if character is in the ASCII ranges 33-47 or 58-63.
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.)
string.lastWord (string)
Returns the last word of string, given the current word-delimiter.
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.
string.memAvailString ()
Returns memAvail() integer-divided by 1024, coerced to a string ending with "K"; generally differs from string.kBytes(memAvail()) by 1.
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.
string.nthChar (string, index)
Returns the char at index index of string; or, if index is 0 or too large, returns the empty string.
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.
string.nthWord (string, n)
Returns the nth word of string, given the current word-delimiter.
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.
string.patternMatch (substring, string)
Returns the index of the first occurrence of substring in string, or 0 if it doesn't occur.
string.popLeading (string, character)
Returns a string made from string with any occurrences of character removed from its start.
string.popTrailing (string, character)
Returns a string made from string with any occurrences of character removed from its end.
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.
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.
string.timeString ()
Returns the system's string representation of the current time.
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.
string.URLdecode (string)
Returns string with %-octet codes and + replaced by the characters they represent.
string.URLencode (string)
Returns string with URL-illegal characters replaced by their %-encoded form.
sys.appIsRunning (processIdentifier)
Returns a boolean reporting whether the application processIdentifier is running.
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.
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.
sys.countApps ()
Returns the number of running processes, including faceless background applications that do not appear in the system's Application menu.
sys.getAppPath (processIdentifier)
Returns the pathname of the application file running as processIdentifier.
sys.getAppSize (pathname)
Returns the preferred RAM allocation for the application at pathname, as shown in the Finder's Get Info window.
sys.getMinAppSize (pathname)
Returns the minimum RAM allocation for the application at pathname, as shown in the Finder's Get Info window.
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.
sys.hasBundle (pathname)
Returns a boolean reporting whether the file at pathname has its bundle bit set.
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.
sys.setBundle (pathname, set?)
Sets the bundle bit of the file at pathname according to the boolean set?.
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.
table.assign (addrObject, value)
Sets the value of the object at addrObject to value, possibly creating the object if it doesn't exist.
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.
table.copyContents (addrSourceTable, addrDestTable)
Calls table.copy() on each entry of the table at addrSourceTable().
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.
table.getCursor ()
Returns the address of the currently selected entry of the target table window.
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.
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.
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.
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.
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.
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.
table.moveContents (addrSourceTable, addrDestTable)
Calls table.move() on each entry of the table at addrSourceTable().
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.
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.
table.sortBy (byWhat)
Sorts the entries in the target table window according to byWhat, which must be "name", "value", or "kind".
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.
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.
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.
target.clear ()
Explicitly returns to the default target situation; if the target's edit window was invisible, also closes it.
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.
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.
thread.evaluate (string)
Initiates evaluation of string as a UserTalk expression in a new thread and returns the ID of that thread.
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.
thread.exists (ID)
Returns a boolean according as a thread whose ID is ID exists or not.
thread.getCurrentID ()
Returns the ID number of the thread within which the call is made.
thread.getNthID (n)
Returns the ID number of the n th thread, or 0 if n is greater than the number of threads.
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.
thread.kill (ID)
Aborts the thread whose ID number is ID. It is an error if there is no such thread.
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.
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.
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.
toys.alphaChar (character)
Returns true if character is a non-diacritic letter, a digit, or underscore.
toys.commentDelete (string)
Returns the first field of string where « is the delimiter character.
toys.dropNonAlphas (string)
Returns string stripped of any character which is not a non-diacritic letter or digit.
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.
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
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.
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.
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.
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.
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 ".".
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.
toys.readFileIntoTextObject (pathname, addrDestination)
Creates or replaces an object at addrDestination, to be a wptext consisting of the data of the file at pathname.
toys.readWholeFile (pathname)
Returns a binary consisting of the data of the file at pathname.
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.
toys.touchPath (pathname)
Sets to clock.now() the modification date of the file or folder at pathname, and that of all its enclosing folders.
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.
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.
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.
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)
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.
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.
window.dbStats ()
Puts up a windoid reporting some statistics relevant to the state of the database.
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.
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.
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.
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.
window.hide (windowReference)
Makes the window referred to by windowReference invisible. Returns false if windowReference does not resolve to an open window.
window.isFront (windowReference)
Returns true or false as window.frontmost() returns a reference to the window referred to by windowReference.
window.isHidden (windowReference)
Returns false or true as windowReference refers to an open visible window.
window.isMenuScript (windowReference)
Returns true or false as windowReference refers to an open menu item script window.
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.
window.isOpen (windowReference)
Returns true or false reporting whether windowReference refers to an open window.
window.isVisible (windowReference)
Returns true or false reporting whether windowReference refers to an open visible window.
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.
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.
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.
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.
window.sendToBack (windowReference)
Sends to the back the window referred to by windowReference. Returns false if windowReference does not resolve to an open window.
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.
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.
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.
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.
window.show (windowReference)
Makes the window referred to by windowReference visible. Returns false if windowReference does not resolve to an open window.
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.
window.zoom (windowReference)
Equivalent to clicking the zoom button in the window referred to by windowReference.
wp.clearTabs ()
Clears all tabs in all paragraphs containing any of the current selection in the wptext target window.
wp.getDisplay ()
Returns a boolean which is false if display updating in the target wptext (or content mode) edit window is currently frozen.
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.
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.
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.
wp.getRuler ()
Returns a boolean reporting whether the ruler is visible in the wptext target window.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
wp.setRuler (visible?)
Makes the ruler visible or invisible in the wptext target window, depending on the boolean visible?.
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.
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).
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.
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.
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".
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.
TOP | UP: Reference | NEXT: Apple Event Suites |