Media_OpenItem ( item { ; options } )
Media_OpenItem opens the file, application, or folder specified. Documents and applications are launched; folders are opened in Finder on Mac or Windows Explorer on Windows.
Parameter | Description |
---|---|
item | Path or container reference to the item to be opened. |
options | Optional parameter. Specify “1” to open the file or launch an application. Specify “2” to open the file’s enclosing folder in Finder on Mac or Windows Explorer on Windows. If the parameter is not specified the function behaves as if “1” was specified. |
Examples
To open a PDF file named “Help File.pdf” in the default folder:
Set Field [ MyTable::Response ;
Media_OpenItem ( "Help File.pdf" ) ]
To open a folder in Finder on Mac or Windows Explorer on Windows containing a Word document named “Correspondence.doc”. The document itself is located in a folder named “MySolution” on the Desktop:
Set Field [ MyTable::Response ;
Media_OpenItem (
".D/MySolution/Correspondence.doc" ;
2
) ]