The openwith statement opens a document with a specific application.
Parameters
This statement has two parameters:
application – the name of the application to be launched. This can include the .app suffix, but it doesn’t have to.
path – is a path to the file to be opened, including the file name (see Files and Folders for more information about file paths).
Description
This statement opens a document with a specific application. This has the same effect as dragging the document to the application in the Finder. The first example will open the PDF document concert-ticket.pdf in Preview. The second example will open it in PDFPen.
openwith "Preview","~/downloads/concert-ticket.pdf"
openwith "PDFPen","~/downloads/concert-ticket.pdf"
If you want to open a document with its default application, use the openanything statement.
Previous versions of Panorama (version 6 and before) used a folder/file format for specifying files and locations. If you prefer this format, you can add a third parameter to the openwith statement. This example opens an image using Pixelmator.
openwith "Pixelmator",dbsubfolder("Images"),"someimage.png"
See Also
History
Version | Status | Notes |
10.0 | New | New in this version. |