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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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