Launch File |
Opens a file with the application that has registered it. This is the same application that would open it if you would manually double-click it.
Syntax
Launch File [ Select ; Result (error) ; FilePath ]
Options
Select entire contents | replaces the entire contents of a field with the result. If not checked the result replaces the currently selected portion of the field |
Result (error) | an error code |
FilePath | the path to the file to be launched |
Returned Result
Data type returned
Error code
Result
The returned result is an error code. An error always starts with 2 dollars, followed by the error code. You should always check for errors. Returned error codes can be:
0 | no error | The file was revealed in the Finder or Explorer |
$$-35 | nsVolErr | No such volume (Wrong disk name or not mounted) |
$$-43 | fnfErr | File not found |
$$-50 | paramErr | Parameter error |
Other errors may be returned.
Originated in
Troi File Plug-in 9.0
Compatibility
FileMaker Pro 17 to FileMaker Pro 21 (2024)
Considerations
You can use FileMaker styled paths, like “filewin:/C:/MyFiles/mydata.doc”.
Example
Launch File [ Select ; $ErrorCode ; "C:\readme.doc" ]
This will open the file in the application Microsoft Word.
Related script steps
Launch Application |
Open Folder |
Reveal File |
Reveal Folder |
Related function
TrFile_Launch |
Related topics
Troi File Plug-in online help (overview)