Take the 2-minute tour ×

I have created the following in AppleScript and although it works when I double click the compiled app, I am left with an empty Terminal window in the dock which seems to remain until I forcibly quit it. So, how can I simply run the given command and close the terminal while the application (vboxmanage) is still running?

tell application "Terminal"
    do script "vboxmanage startvm MyWindows; exit;"
end tell
share|improve this question

1 Answer 1

up vote 2 down vote accepted

You can use the following, if you don't want a Terminal window involved and the program is able to function without Terminal:

do shell script "vboxmanage startvm MyWindows"

The actual AppleScript will wait for the command line program to quit though. I like it best when used as a Service via Automator.

share|improve this answer
Oh very nice - thanks very much. :) –  R4D4 Nov 3 '11 at 20:16

Your Answer


