The MacOS object is the root of the built-in MacOS-specific object model
offered by the JavaScript OSA implementation.
| Method/Property |
Description |
| MacOS.libraryVersion() |
this library's version string
|
| MacOS.libraryCopright() |
this library's copyright notice
|
| MacOS.libraryURL() |
this library's support URL
|
| MacOS.version() |
return the current OS version number "X.XX" (e.g.
"8.60")
|
| MacOS.message(msg) |
display a message in a dialog box
|
| MacOS.ask(MSG) |
display a dialog asking a question
|
| MacOS.beep() |
beep
|
| MacOS.gestalt(selector) |
get the value of a gestalt selector
|
MacOS.finder()
MacOS.desktop() |
returns a MacOS.AEApp
object referring to the Finder on MacOS 8 and 9 systems, and referring
to Desktop.app on MacOS X systems
|
| MacOS.appSelf(loadAete) |
returns a MacOS.AEApp
object referring to the application running the script
The loadAete (boolean, optional, default = true)
parameter determines if the application's dictionary is loaded.
|
| MacOS.appBySignature
(signature, loadAete) |
returns a MacOS.AEApp
object referring to a particular running application identified
by its 4-character signature. If the application is not already
running, it is launched.
The loadAete (Boolean, optional, default = true)
parameter determines if the application's dictionary is loaded
|
| MacOS.finder() |
returns a MacOS.AEApp
object referring to the MacOS Finder
|
| MacOS.pathToMe() |
returns a MacOS.FileSpec
object referring to the application running the script
|
| MacOS.findFolder
(signature) |
returns a MacOS.FileSpec
object referring to a well known MacOS folder identified by its
4-character signature
|
| MacOS.aeResume
(suiteID, eventID, params, ...) |
forward an AppleEvent to the application running
the script for further processing (equivalent to AppleScript's continue
statement).
SuiteID and EventID are the 4-character AppleEvent
suite and event IDs respectively. All remaining parameters are added
as parameters of the AppleEvent.
If the params argument is a JavaScript object, its
properties are added as parameters of the event. Properties must
be named "ae_XXXX" where XXXX is the parameter's 4-character
ID.
If the params argument is a MacOS.AEDesc
object and that object contains an AppleEvent Record (typeAERecord),
each property of that record are added to the AppleEvent as a parameter.
In all other cases, the params value is added to
the AppleEvent as the direct object (keyDirectObject/'----').
|