LaunchFile()

Example 1:

To open a MS Word document named pricelist.doc from the D: drive of the users machine, use the following syntax:

LaunchFile("d:\\pricelist.doc")

Example 2:

In Example 1 above, the drive letter was assumed to be d: because that is most often the drive letter assigned to the CD-ROM drive. However, Opus provides a System variable named SYSTEM_CD_DRIVE that will determine the correct drive letter for the user's first CD-ROM. Below is the same example as above but using the System variable

var pathname = SYSTEM_CD_DRIVE + "\\pricelist.doc"
LaunchFile(pathname)

Example 3:

In the example below, the Windows Notepad program is opened showing the Readme.txt file stored in the folder of the current publication’s directory. Notice the use of two System variables that automatically work out both the directory where windows is stored on the users machine and the path to the current publication from which this script was run

var Fname = SYSTEM_WIN_DIR + "\\notepad.exe"
var Params = SYSTEM_PUBLICATION_DIR + "\\Readme.txt"
LaunchFile(Fname,Params)

Close