tell application "Terminal" do script "lsof; osascript -l AppleScript -e " & quoted form of ("tell application \"Terminal\" to close (first window whose frontmost is true)") in window 1 -- wait until the window is gone: repeat while (exists window 1) end repeat end tell
Executando comando shell com AppleScript
tell application "Terminal" do script "lsof; osascript -l AppleScript -e " & quoted form of ("tell application \"Terminal\" to close (first window whose frontmost is true)") in window 1 -- wait until the window is gone: ...
André Jaccon