External Process Helpers
Blueprint nodes to open files in other applications, or to launch and drive an external program from your extension. Back to Helpers.
Open a file in its application
To simply open a document, a web page or an executable, use Launch File In Default External Application:
|
Input |
Role |
|---|---|
|
In File Name |
The file, URL or executable to open. |
|
In Parms |
Arguments passed to the application. |
|
In Verb |
Open (view, by default) or Edit. |
|
In Prompt To Open On Failure |
If no application is associated with the file type, shows the Windows "Open with" dialog. |
It returns true if the application was opened. Skyreal VR does not follow the program afterwards. To show a folder instead, use Explore Folder.
Launch and drive a program
When you need to know whether the program is still running, read what it writes, send it text or stop it, use the External Process Manager.
-
Call Try Get Skr External Process Manager.
-
Fill a Skr External Process Spec (see below), then call Launch Process. It returns a handle on the program, or an error.
-
Bind the handle's events, then call Refresh Process Status regularly, for example on a timer.
⚠️ The events are only raised when you call Refresh Process Status: Skyreal VR does not check the program on its own.
Process spec
|
Field |
Role |
|---|---|
|
Executable Path |
The program to launch. |
|
Arguments |
Its command-line arguments. |
|
Working Directory |
The folder it runs in. |
|
Launch Hidden |
Launches it without a window. |
|
Priority Modifier |
Its priority: below 0 is lower, above 0 is higher. |
|
Create Read Write Pipes |
Tick it to read its output and send it text. |
|
Lifetime Policy |
Kill On Parent Exit stops the program when Skyreal VR closes. Default lets it run. |
Handle
|
Node or event |
Role |
|---|---|
|
On Process State Changed |
Event raised when the state changes: Running, Exited_Natural (the program ended) or Exited_KilledByManager. |
|
On Pipe Read Changed |
Event raised with each new piece of text the program writes. Requires Create Read Write Pipes. |
|
Refresh Process Status |
Updates the state and reads the output. Raises the events above. |
|
Is Running / Try Get Skr Process State |
Tells whether the program is still running, or returns its state. |
|
Try Get Exit Code |
Returns the exit code once the program has ended. |
|
Try Write To Pipe |
Sends text to the program. Requires Create Read Write Pipes. |
|
Kill |
Stops the program. Kill Tree also stops the programs it launched. |
The EUW_SampleExternalProc widget, in the SkrPlatformUtilities plugin content, is a working example.
Read the Skyreal VR command line
To adapt your extension to how Skyreal VR was started, use Contains In Cmd: see Helpers.