I have created an interface that writes output to a shell executable script. I then want to run the shell script from Xojo in the background .
I use Shell.Execute("./myScript \&") doesn’t seem to work. I have also added & to the end of the command line in the script, but this doesn’t work either.
If you are using mode = 2, then you need to wait to let the command finish:
theShell.Mode = 2
theShell.Execute "./MyScript"
Do
theShell.poll
Loop Until Not theShell.IsRunning
If theShell.ErrorCode <> 0 Then
MsgBox "Shell Error" + EndOfLine + EndOfLine + theShell.ReadAll
Else
// ... do what you do when the command completes
End If