Skip to Content

Listen to the Joystiq Podcast (because your ears can't read)
AOL Tech

Filed under: Features, How-tos, Productivity

AppleScript: build a simple task launcher

If you're like me, when you sit down at your Mac, you end up opening a few specific apps depending on what kind of project you're working on. I am going to show you how you can group these applications into "task launchers" that will bring up a suite of programs with one click. For instance, I have a script that will open iPhoto, iDVD, and iMovie called "Create Movies." When I run this script, it will open all of the applications I need to make my movie. I also have one called "Productivity" that will, when opened, launch Mail, iChat, Pages, and Yojimbo (even though some might argue with iChat's productivity value).

Want to make your own launchers? Continue reading for the instructions.

Writing the Script

To create this script, you will use the tell command -- you may recall that this tells a specific application to do a specific task. Open the Script Editor and type the following script:

tell application "X" to activate

Replace the "X" with your application of choice. For example, if you wanted to add Mac OS X's Mail application, you would type:

tell application "Mail" to activate

Remember to include the quote marks around the application name (this helps to prevent errors for some applications). You can repeat this tell command for as many applications as you would like to open. When you're done, your AppleScript should look something like this:


Saving Your AppleScript
Once you have your script typed, let's save it. We'll save this application as an application bundle (as noted in the post on how to save AppleScripts, application bundles will allow you to save a universal application; in other words, it will work on both Intel and PowerPC Macs).

Go to the save dialog (File > Save). Once there, let's tweak some save settings. In the "File Format" drop-down menu, select "Application bundle." You can also check the "Run Only" checkbox (if you don't want people to see your script after it is saved).


Using the task launcher
You can repeat the steps above to create as many of these task launchers as you would like. To activate the script, just double click on its icon. If you want to streamline a bit further, you can place these scripts in the dock, either among the applications or in a folder so you can make a stack out of them.

To create a stack, just make a new folder in a convenient location (perhaps a "Launchers" folder in your home directory), drag-and-drop the scripts that you've created into your new folder; then drag the entire folder to the right side of the divider in the dock. You now can have multiple applications launch with just two clicks!



There you have it, your very own "no-duct-tape-required" task launchers!

Reader Comments (Page 1 of 2)

Tip of the Day

To find out what version of Mac OS you are running, go to the Apple logo in the top left corner, click it and choose About This Mac. From that window you will see the version number, processor, memory and chosen startup disk. Clicking Software Update will check for updates, and More Info... will open up an extensive list of everything on your machine.


Follow us on Twitter!
TUAW [Cafepress]

Sponsored Links

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor
Apple Texas Hold 'Em

 

More Apple Analysis

AOL Radio TUAW on Stitcher