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
link|improve this question

feedback

1 Answer

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.

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

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.