|
|
|
|
Functions
MioScript Reference
|
|
Syntax
| mio.run(productID, mioFile, pathToMioEngine) |
Parameters
| PID | productID | Product ID. Ignored is the pathToMioEngine is specified.
| | STRING | mioFile | Optional. Mio file to run. If both the path to the file and pathToMioEngine are not specified, the installation folder of the specified application is used.
| | STRING | pathToMioEngine | Optional. Path to MioEngine, or full exe filename. If not specified, the installation folder of the specified application is used. |
Return value
No value is returned.
Description
Executes a .mio file using the version of MioEngine installed with the application specified by the product ID.
The name of the MioEngine exe file is the product name with .exe extension. The product name is found in the registry database (key productName).
If your application is not installed, the mioEngine running the current application is used to run the mio file.
This function can be called from JavaScript with mio_run.
Controlling the task (process) name of your application
The task or process name of a windows application is set by the name of the exe file.
You can create a copy of MioEngine and run a mio file using this copy to control the name of the process.
In the following example, the current MioEngine, running the current application, is copied and used to run a mio file.
The process name of the application, as visible in Windows task manager, will be MyApp:
disk.file.copy(system.mioEngine.filename(), path.rsc("MyApp.exe"))
mio.run(null, path.rsc("myMioFile.mio"), path.rsc("MyApp.exe"))
|
Note: This function is defined in the library klib.k and is linked automatically. |
MioScript Sample Code
mio.run("{APP_ID}", "myMio.mio") |
|
|
|