AppleScript: build a simple task launcher
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:
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).
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!
Subscribe to Newsletter
Software Updatesmore updates
- Dropbox adds support for TouchID
- YouTube for iOS gets updated with full support for iPhone 6 and 6 Plus
- iOS 8.0.1 update now available (Updated -- Don't update!)
- NFL Mobile updated for 2014 Season with new Fantasy Football features, NFL Now integration
- Yahoo Mail improves email inbox searching with new filtering options
- Ember for Mac gains 'hugely-requested' screen recording feature