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