1

so I'm totally new to applescript..

basically I want my applescript.app to run a shell script then exit

do shell script "/usr/local/groovy/bin/groovyConsole"

the above script opens groovyConsole just fine, but my applescript.app is still running - I want it to close itself after it runs the shell script....

any help would be great!

zack
  • 111

2 Answers2

3

You can have the shell run a program “in the background” (by appending &), but do shell script will still wait until every process has closed any instances of the file descriptors it opened for the program’s stdout and stderr. Redirecting them will suffice.

do shell script "/usr/local/groovy/bin/groovyConsole >/dev/null 2>&1 &"
Chris Johnsen
  • 42,029
0

Just a thought, try adding an ampersand sign to the end of the script.

do shell script "/usr/local/groovy/bin/groovyConsole &"

It backgrounds the commands and will return you to a prompt (when at a command line). It might just make the Applescript app finish.

Good luck!

Trevor
  • 133