launch.appWithDocument

Syntax launch.appWithDocument (appPath, docPath)

Params appPath is a file path name pointing to the application you wish to launch.

docPath is a file path name pointing to the document you wish to be opened by the application.

Action Launches the application named in appPath and instructs it to open the document in docPath.

Returns True.

Examples launch.appWithDocument ("System:Utilities:ResEdit", "System:System Folder:Scrapbook File")

   » true

Note that the Scrapbook File is not a ResEdit document, but can be opened by it.

Notes By passing the empty string for the docPath parameter, Frontier 3.0 or later will prevent the newly-launched application from opening a default document. Important: in this situation, you should send a message to the application to open a document before

attempting to interact with it.

This verb works faster than launch.anything; you should use this verb when you know the path to the application and document you wish to open.

Unlike launch.anything, the newly launched application is not activated; Frontier remains the foreground application. To bring the other application to the foreground, use sys.bringAppToFront.

If the application does not do any background operations, it may not appear in the Application menu until it is brought to the front.

If the application is already running, this verb returns true immediately; the document will NOT be opened.

See Also launch.application

launch.anything

sys.bringAppToFront

Discuss