ScriptApplication

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:
  • If the application is stored in the the file system, this string should be of the form "file:app_name".
  • If the application has been stored in the Virtual Ticket database (dragged-and-dropped into the Stored Scripts window of Virtual Ticket Administrator), the string should be of the form "database:app_name".

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:

See also

Application, CompiledScript, DoAppleScript

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.