Unfortunately you cannot pass multiple applications to the 'tell application' call.
Rather, you could use a unix utility that can terminate multiple applications at once - killall.
You can invoke this utility from within an AppleScript:
do shell script "killall firefox Mail" - This would terminate FireFox and Mail
'killall' is case sensitive, so you must first determine the process names of the applications that you wish to kill.
- Launch the applications that you will want to be terminating with the script
- Use the following command (in a Terminal window) to find their full and correct names. (In this example, we are looking to find out tweetdeck's correct process name).
ps x | grep -i tweetdeck | grep -v grep
With TweetDeck running, this will give output similar to the following:
59127 ?? S 0:01.23 /Applications/TweetDeck.app/Contents/MacOS/TweetDeck -psn_0_21423213
The last part of the path is the process name as it should be passed to 'killall'. In this case TweetDeck (...Contents/MacOS/TweetDeck).
So, we go back to our AppleScript and add TweetDeck to the string of applications that we are terminating. In addition to my previous example, I'd do:
do shell script "killall firefox Mail TweetDeck"
Hope this helps!