Photography software

Mac OS X Hints - July 2006

Uncovering the alias

If you’ve ever wished you could be in many places at the same time, then you’ll appreciate OS X’s useful aliases. An alias is basically a small file that points to something else—an application, a folder, or a file. (It’s similar, but not identical, to a Windows shortcut. ) Double-clicking on an alias does the same thing as double-clicking on the original item—folders and documents open, and applications launch. Use aliases to get easy access to files and applications while keeping the originals in one place.

To create an alias, simply select the file you’d like it to point to (the source file), and select File: Make Alias (Command-L). You can also create an alias by holding the Command and option keys while dragging a file to a new location—you’ll see a small arrow in the corner of the icon while you’re dragging it, which indicates that you’ll create a new alias when you release the mouse.

You know something is an alias when you see a small arrow at the bottom left of the file’s icon. If you no longer need the alias, delete it. The original file or folder won’t be harmed, because the alias is just a pointer to the original. Here are a few interesting ways to use aliases:

Work the Dock Put a folder of aliases to often-used applications or documents in your Dock. Control-click on that folder, and you’ll have a pop-up menu of fast-access items. You can even put aliases to other folders in there, and navigate into those folders, all via the pop-up menu.

Keep Track of Current Projects Do you save current projects on the desktop and then file them away inside your Documents folder when you’re done? Instead, keep everything in your Documents folder and put aliases to current projects on your desktop. This is a particularly good idea if your backup strategy involves backing up your Documents folder and not your whole computer.

Collect Launch-Together Applications Say you typically work with certain applications at the same time—for instance, the Camino Web Project’s free browser, Camino; Panic’s $30 FTP application, Transmit; and Bare Bones Software’s $200 HTML editor, BBEdit. Make a new folder containing aliases to these three applications. Now you can open the folder, select all the aliases, and then press Command-O to launch all three programs at once.

Gather Files in One Location Say you’ve been creating artwork for multiple clients and multiple projects, and storing each file in its own project-related folder. Now you’d like to be able to open any of these items quickly, without having to navigate to each project-related folder.

Create a new folder, name it, hold down the Command and option keys, and then drag each file you’d like access to into this folder. From now on, you can just open this folder and have quick access to any artwork by double-clicking on one of the aliases.

Access Files on Remote Servers If you often access files stored on servers, try this trick. The next time you connect, create a folder of aliases to the files or folders you access on that server. Disconnect from the server. Now when you need to access the server, just double-click on one of the aliases. If you’ve stored connection information in your Keychain, the server should automatically mount. (This may not work with all servers, but it definitely works with Personal File Sharing.)

Open Screenshots Immediately

Screenshots often come in handy—for instance, when you need a quick snapshot of something you’re working on or when you want to send a picture of an error message to the IT department. OS X includes some good built-in tools for taking screenshots—Command-shift-3 will take a picture of the whole screen, and Command-shift-4 will let you select a region to capture (or then press the spacebar to take a picture of a window).

But by using these tools, you often do the screenshot two-step. First you take the picture. Then you switch to the Finder, hunt for the saved file on your desktop, and open it to make sure you captured what you intended. With a little help from Unix and AppleScript, you can automate this process (as long as you’re running OS X 10.3 or 10.4). An AppleScript will activate a Unix script that captures the screenshot, gives it a unique name, and then opens it in Preview.

Open Script Editor (/Applications/AppleScript), and enter the following code, also found here:

	do shell script "DATE=`date '+%Y%d%m-%H%M%S'`;
	FILE=~/Pictures/screenshot-${DATE}.png;
	screencapture -i -W -x $FILE;
	if [ -e $FILE ];
	then open /Applications/Preview.app $FILE;
	fi"
	

When you’ve entered the script, select File: Save As, give the script a name, set the File Format pop-up menu to Application, and save the script to a convenient location. One good spot is the your user folder /Library/Scripts folder—from here it will be easily accessible in the Script menu. (Create this folder if you don’t have it already.) If you haven’t turned on the Script menu, go to the /Applications/AppleScript folder. If you’re running OS X 10.3, double-click on the Install Script Menu program, and you’re done. If you’re using OS X 10.4, launch AppleScript Utility. Choose the Show Script Menu In The Menu Bar option and (if you want to have access to some useful scripts) the Show Library Scripts option. Quit the program. The Script icon will appear in the menu bar.

Once you’ve saved your screenshot script, using it is simply a matter of activating it. If you saved it to the your user folder /Library/Scripts folder, choose it from the Script menu. You’ll see the camera icon on screen; press the spacebar when the icon is over the window you’d like to capture. After a brief delay, the image you captured will open in Preview.

[ Senior Editor Rob Griffiths is the author of Mac OS X Power Hound, Panther Edition (O’Reilly Media, 2004), and runs the Mac OS X Hints Web site. ]

Subscribe to the Help Desk Newsletter

Comments