I am trying to launch a second session of SU programmatically from another script. The second session should start with the a specified user script and exit. I am on Mac OSX.
At the moment I am using:
cmd = 'open -n -a sketchUp ' + su_file + ' --args -RubyStartup ' + mc_script pid = spawn cmd
(You would use start on Windows).
mc_script are an SU file and a ruby script respectively.
This works, but I have a couple of issues:
- Most of the times I have to click on the new Sketchup icon on the dock in order for the script to begin to run.
- Sometimes SU starts, but the script is not executed and I have to launch it from the Ruby console manually.
Any suggestion? Is there a better way to do this?