While Apple makes opening applications and documents in OS X relatively straightforward, there may be times when you'd like to automate the process, opening those apps and docs when you wish without lifting a finger. Perhaps, for example, you want Mail to open every time you log in. Or maybe you want a specific set of apps to open every Friday at 9:00 am. Or maybe you want to get fancy and have a particular program open whenever a certain disk is mounted.
All of these things are possible using tools built into OS X. In fact, there are four distinct ways to schedule or automate the opening of applications and documents on your Mac, without the intervention of third-party tools.
The most common way to automate the opening of particular documents and applications is to tell OS X to open them whenever you log into your account. There are a couple of ways to do so. First, you can right-click a program on the Dock and choose Open At Login from the Options submenu. Or you can go to the Users & Groups pane in System Preferences, choose the Login Items tab for your user account, and add or remove items from the list, using the plus (+) and minus (-) buttons at the bottom of the window.
That Login Items list is often used by developers to open background applications and system menu extras for third-party programs you have installed. But you can add practically any item you would like — including documents, which (if added to the list) will open in their default applications.
The second way to automatically launch apps and documents uses OS X's built-in Folder Actions, which allow you to trigger a script when the contents of a specified folder is changed.
To set this up, open the AppleScript Editor utility, and then enable the Show Script Menu in Menu Bar in the General tab of its preferences. That done, open this menu and choose Configure Folder Actions from the Folder Actions submenu. In the panel that pops up, check the box to enable folder actions, and then click the plus below the left-hand column to add a folder. Now select the folder and click the plus in the right-hand column to bind a script to this folder.
There's one convenient built-in script — add — new item alert — that monitors the contents of the folder and, when something new is added to it, alerts you. You could make a copy of this script and have it launch the new item(s) instead. Or you could build your own custom folder action — using AppleScript Editor or Automator (select Folder Action when creating a new workflow) — to launch folder contents.
Sign up for CIO Asia eNewsletters.