In the Macintosh OS environment, returns an object representing an AppleScript/AppleScript Studio application and allows both synchronous and asynchronous execution of the application's handlers.
Core function
Syntax
ScriptApplication( app )
Parameters
Parameter | Description |
---|---|
app | A string that specifies the application:
|
Description
ScriptApplication is a top-level function and is not associated with any object.
Use the ScriptApplication method to access an AppleScript/AppleScript Studio application in the Macintosh OS environment. Each handler of the application will be represented by two methods of the MetaScript object returned by ScriptApplication:
handler( args ) | Synchronously calls the handler handler of the AppleScript application with the given arguments and returns the value returned by the handler. The xecution of the MetaScript waits for the handler to return. |
call_handler( args ) | Asynchronously calls the handler handler of the AppleScript application with the given arguments and does not return any value. The execution of the MetaScript does not wait for the handler to return. |
Examples
Assume the following compiled AppleScript application has been saved in the file "ConvertJPEGTo150DPI" and stored in the Virtual Ticket database (dragged-and-dropped into the Stored Scripts window of Virtual Ticket Administrator):
To use the script application in MetaScript: