AppleScript 101: Open 3 Applications At Once!

Sometimes I find myself opening the same three Applications when I turn on my Mac. This post shows how to automate this process with AppleScript.

To really know my Mac, I should really get to know AppleScript. According to Apple, “AppleScript is an English-like language used to write script files that automate the actions of the computer and the applications that run on it.” AppleScript is the foundation of Automator.

I chose this example because it will be extremely useful when used with Spaces, a new feature in OS X 10.5 Leopard that allows me to organize Applications into separate desktops. It’s like have four monitors in one! I can even tell my Mac to run it whenever it turns on, giving me touch free access to the Applications I always use.

Below is an AppleScript that tells three applications to open, tells Firefox to visit Gmail, opens Adium, opens and hides another application called Transmission. You can insert your own applications and even substitute Safari for Firefox.

Open Script Editor in User:Applications:Applescript:Script Editor

Type in the following, inserting the names of any Applications you want to open:

Tell AppleScript Get URL Hide Open Applications

In Script Editor, Click Run.

Tada! All the Applications open!

Now, we must save our little Applescript so we can use it in our everyday actions…

Select File: Save As. Name Your Script something like Open Apps.

Save As to User:Library:Scripts.

To be able to click on the AppleScript via the menubar:

Open Applescript Utility found in User:Applications:Applescript:Applescript Utility

Applescript Utility

Check Show Script Menu in Menu Bar. A little black script icon now shows up in the top right of the screen. Click the Script Icon and you will see your Full Screen script, probably at the bottom. Go here whenever you want to view a movie in fullscreen. You’ll notice a bunch of other scripts. If you want to tidy up the Script Menu, go back into the Applescript Utility and uncheck Show Library Scripts.

6 Comments

Steven KernoJune 27th, 2007 at 4:32 pm

Hey is there a way to map Network drives using apple script? This would be very helpful.

steveblueJuly 9th, 2007 at 5:51 am

Steven,

I found a message board thread over at 123MacMini.com that may answer your question.

Follow the link:
http://www.123macmini.com/forums/viewtopic.php?p=55016

SteveFebruary 11th, 2008 at 2:10 pm

steveblue,

Really neat idea. In System Preferences, just add this to your login items, so you don’t have to click on anything at all. I dunno if this still works in Leopard (still faithfully running Tiger), although I don’t see any reason for Apple getting rid of this great idea

binocularsApril 10th, 2008 at 10:54 pm

Lately I have been trying to find any kind of information for my project, but unsuccessfully. Now it seems like I finally found a lot. This is the greatest site among all internet-sources.

opening multiple apps - Mac-Forums.comFebruary 11th, 2009 at 9:34 am

[...] actually very simple, I started to write the script but then I googled for exactly what you need: iUseApple » Blog Archive » AppleScript 101: Open 3 Applications At Once! just follow it to make your [...]

BenApril 24th, 2009 at 5:53 pm

How do you make it so you can open up a website?

Leave a comment

Your comment