RunProgram
Description: |
baRunProgram runs an external application and can optionally wait until the other program quits before continuing. | ||||||||||||||||||||||||||||||||||
Platforms: |
Windows and Macintosh | ||||||||||||||||||||||||||||||||||
Usage: |
Result = baRunProgram( Program , State, Wait ) | ||||||||||||||||||||||||||||||||||
Arguments: |
String, string, integer. |
||||||||||||||||||||||||||||||||||
Returns: |
Integer.
On Macintosh, an error always returns 0. |
||||||||||||||||||||||||||||||||||
Examples: |
Director: Authorware: |
||||||||||||||||||||||||||||||||||
Notes: |
On Windows, where possible, the complete path to the program should be specified. If a path is not provided, then Windows searches for the file in the following order: the current directory, the Windows directory, the Windows system directory, the directory containing the executable file for the current task, the directories listed in the PATH environment variable, the directories mapped in a network. You are not limited to supplying just an executable file name; you can add any other command line parameters that the executable supports. For example, to load the Adobe Acrobat Reader with mydoc.pdf, use the following call: baRunProgram( "acroread.exe mydoc.pdf", "maximised", false ) To print an Acrobat file, you can use baRunProgram( "c:\acrobat\acroread.exe /p mydoc.pdf", "Hidden", true ) On Macintosh, you must supply the full path to the file. Command line arguments are not supported. If used with the Wait option, this function will not return control to Authorware/Director until the jumped to program has quit. If your user switches back to the Authorware program, it will appear to have frozen. You may choose to display an on-screen message to inform your user of this. You can also use the
baWaitTillActive function to pause execution until the Authorware/Director window becomes active again. |
||||||||||||||||||||||||||||||||||
See also: |
baWaitTillActive |