I’m trying to use Apple Script to execute a shell script file in a new Terminal window, while sending it options. How do I do that?
It seems as if Terminal only interprets the path to the script, and ignores what comes next.
I'd like to use something like that:
do shell script "/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal " & pathToScript & " -option"
The script runs but it doesn't get -option
.
Note: I need a Terminal window for user interaction. Running the script directly executes it in the background.
Best Answer
The following AppleScript works for me: