I can’t seem to find a way to do this. Basically I want to do this in pseudocode:
MainScript.fsx:
printfn "starting an external script"
launch Script1.fsx
printfn "Finished"
Script1.fsx:
printfn "I am Script1 running"
So the output window should show (after running MainScript.fsx):
"starting an external script"
"I am Script1 running"
"Finished"
Basically the launch Script1.fsx is the method I don’t know how to implement.
Thanks in advance,
Bob
You can use
ProcessStartInfoto start a new process. You need to give the path to fsi.exe, and use your fsx file as an argument. You need to setUseShellExecuteto false to have the result in your interactive shell.For example: