unity launch .app created in applescript - Win32Exception: Cannot find the specified file
All I want to do is launch an apple script that I've saved as a .app file so will play on launch. I've launched other applications with this line of code:
System.Diagnostics.Process.Start("/file path/file");
but doesn't work with the script I wrote.
variations of code I've tried:
System.Diagnostics.Process.Start("/file path/file");
or
System.Diagnostics.Process.Start("osascript -e 'tell "/file path/file");
or
ProcessStartInfo info = new ProcessStartInfo("/usr/bin/osascript, -e, tell "/file path/file");
or
ProcessStartInfo info = new ProcessStartInfo("/file path/file");
info.Arguments = "-silent";
Process.Start(info);
i just get the same error when i try to access it:
Win32Exception: Cannot find the specified file System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) (at :0) System.Diagnostics.Process.Start () (at :0) (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()..... etc. goes on a bit
any ideas? .. you all seem to be much smarter than me thanks
Answer by Tommyboyboy · Nov 23, 2021 at 10:18 PM
So, I worked it out.. don't forget that .app is actually just an enclosing folder of the executable files.. pretty simple really. doh!
Your answer

Follow this Question
Related Questions
how to make a javascript object to launch,Comment 0 Answers
Launching Windows apps from Unity 0 Answers
Enemy keeps floating throw roof? 0 Answers
How to add a script to a parent object and not every individual child object. 1 Answer
Increase variable? 0 Answers