Once you’ve tweaked your machine to suit your style, you can use these hints to increase your efficiency.
The Open and Save dialog boxes offer an ingenious column-view look at your entire hard drive, making it easy for you to choose a folder for opening or saving a document. Trouble is, the dialog box appears with all the majesty of a peanut floating in the middle of your screen. It’s just too small—and there’s no reason it should be that way.
Fortunately, Mac OS X lets you expand these dialog boxes and even remembers the size you like. Now the next time you open or save something in that program—even if you restart the program—the dialog box remains your preferred size.
Simply follow the directions in Figure 4-8.
When you bring up an Open or Save dialog box in Mac OS X, you can click various columns, folders, and pop-up menus to navigate your system.
It’s often much faster, though, if you tell the dialog box, “Look here!” and shove the icon you want under its nose, by dragging a file or folder directly into the dialog box, as shown in Figure 4-9.
Tip
To navigate directly to your desktop folder from an Open or Save dialog box, the Hide All Windows Exposé trick ( Section 4.2.2) can be a handy timesaver. Once you reveal the desktop, just begin dragging the icon you want, press the keyboard shortcut to turn off Exposé, and drop the icon right into the dialog box.
When using Save As, you can quickly jump to any folder on your system by hitting the / key. When your press this key, a “Go to the Folder” dialog box pops up, allowing you to type the path to your destination.
Why type when you can click the mouse? One word: speed! If you’re several layers deep in your hard drive, hit /, type /Users/chris (where “chris” is your short user name) and hit Return. Instantly, you’re back to your Home folder.
Just like in the Finder, you can use keyboard shortcuts to jump to certain folders in Open and Save dialog boxes. In general, you hold down Shift-
and the first letter of the folder you want to jump to—Shift-
-A for Applications, Shift-
-D for Desktop, and so on. The only shortcut that doesn’t work in dialog boxes but does work in the Finder’s Go menu, in fact, is Shift-
-U for the Utilities folder.
Besides the keyboard shortcuts listed in s Section 4.3.3 and Section 4.3.4, there are a few others that can improve your Save and Open dialog box efficiency:
Return or Enter “clicks” the blue, pulsing button (usually Save or Open).
The Esc key (or
-period) “clicks” Cancel to close the dialog box.
The
-[ and
-] combinations navigate you back and forward to items you’ve already seen, just as in Safari or the Finder.
-2 switches to list view, revealing additional data for each file—just like List view in the Finder.
-3 switches to column view, revealing a hierarchical list of a folder’s parent folders. (This is the standard view for Open and Save dialog boxes.)
If you’re navigating via the keyboard, you probably already know you can type the first few letters of an item in a menu or pop-up list to jump directly to it. But what if you’re viewing a really long menu and need to quickly reach the top or bottom? Simply hold Option and press the up or down arrow, and you’ll instantly jump to the top or bottom end of the menu, respectively.
This little trick works nearly everywhere—in shortcut menu pop-ups, in Recent Item listings, in Web site pop-up menus, and in the menu bar, too.
If you think your mouse has a limited number of clicks in its lifetime, here’s a nifty click-saving trick for whenever you’re scrolling up and down in a document: simply click and hold the mouse button on one of the two vertical scroll arrows. As expected, the document will begin to scroll. Now move the mouse (while still holding the button down) onto the arrow for the opposite direction, and the document will start scrolling in the new direction.
This trick works best if you’ve used the Appearance pane in System Preferences to set the scroll arrows to appear together (in the “Place scroll arrows” section). Otherwise, you’ll have to drag your mouse from one end of the scroll bar to the other.
Sheets are a wonderful feature of Mac OS X that keep dialog boxes associated with their respective windows. The Save and Open sheets are the most familiar, but there are many more. The Add Bookmark command in Safari, for instance, is a sheet. So is the Don’t Save/Cancel/Save dialog box that appears when you try to close a document with unsaved changes in TextEdit, as well as the Save As sheet in Word 2004. Basically, anytime you see a dialog box drop down from a window’s title bar, you’re looking at a sheet.
As you may have noticed, sheets are displayed with a nice smooth scrolling animation as they drop into place. As you also may have noticed, the animation is quite slow.
Luckily for you and your productivity, there’s a hidden preference that controls the speed of sheet animation. Open Terminal (in Applications → Utilities) and type:
defaults write NSGlobalDomain NSWindowResizeTime 0.001
This nerdy-looking command is the Unix method of setting preferences. In this particular case, you’re setting a preference (the “defaults write” bit) for all applications (the “NSGlobalDomain” piece). The particular preference you’re setting is called “NSWindowResizeTime,” to which you’re assigning a value of .001. So what does it do?
The NSWindowResizeTime controls the speed with which sheets animate into existence. This value starts out set to 0.2, which represents two-tenths of a second for each 150 pixels of resizing. You’ve just set it to one one-thousandth of a second per 150 pixels, which is exactly 200 times faster than usual.
To see the change take effect, you’ll have to quit and relaunch any applications that were running when you executed the command. To witness the dramatic impact you’ve just made, launch TextEdit and type a few letters in the blank document that appears, then select File → Save As. Instead of leisurely rolling into existence, the Save As sheet now simply appears—and disappears when you’re done with it.
If you enjoy torturing yourself and wish to return to the original behavior, open the Terminal again and type:
defaults delete NSGlobalDomain NSWindowResizeTime
This code deletes the preference you created, and all applications (after relaunching, of course) will return to the original 0.2 second sheet speed.
The Close button (the red upper-left button of every window) is more than a button—it’s also an indicator. When you save the document you’re working on, it’s solid red, as shown in Figure 4-10 at left. If you make changes but haven’t yet chosen the File → Save command, the button sprouts a small dot at its center (Figure 4-10, right). That’s a handy reminder that your document needs saving.
No doubt you’ve had the unnerving experience of receiving an email from a friend with a note saying, “You’re the one person on the planet who would really appreciate the attached.” And then the file opens revealing 43 pages of gibberish.
This sort of annoyance could have been avoided if your friend had sent you the document as a Portable Document Format (PDF) file, which you can read using the free Acrobat Reader program (Figure 4-11) or Mac OS X’s Preview program.
Figure 4-11. This trick once required the $250 Adobe Acrobat Distiller program. You can now create a PDF file from any document in almost any program.
PDF files have a number of advantages over standard document files. For example, when you distribute PDF files to other people, they see precisely the same fonts, colors, page design, and other elements that you included in your original document, even if they don’t have the fonts or the software you used to create the document. In fact, print shops like Kinko’s often require you to submit PDFs since they may not have all 263 fonts you used on your band’s latest flyer.
Many a software manual, Read Me file, and downloadable “white paper” comes in this format. But PDF files are also one of Mac OS X’s common forms of currency. In fact, you can turn any document (in any program with a Print command) into a PDF file. With the file open, just choose File → Print, and then click Save as PDF.
PDF files are particularly useful for saving information on Web sites. If you find a Web page you’d like to keep, simply save it as a PDF file. You’ll have a permanent record of the text and images on the page, making it a convenient way to preserve online shopping receipts and travel confirmations. (The links on the page, however, won’t work.)
If you download and use lots of demos, freeware, and shareware from the Web, consider creating a software installation library: a collection of folders that makes it easier to reinstall things you’ve downloaded without having to download them again. Then, if you get a new computer, install a new hard drive, or need to reinstall Mac OS X, you’ll have an easy way of finding the programs.
Create a folder on a hard drive or partition with lots of space. Then create alphabetic subfolders within the main folder, as shown in Figure 4-12. When you download an update or installer, drag it into the proper alphabetic folder.
Tip
You may wish to create a special Apple folder to hold system updates and Apple-supplied applications.
This arrangement is even better with the help of folder actions (hint Section 2.5.12). Under this scenario, you can drop a file into the main folder and have it automatically filed into the appropriate subfolder.
The ability to drag and drop text has been around in the Mac OS for years largely because it’s a terrific way to rearrange words, sentences, or paragraphs without having to copy and paste. But many Mac fans panic when they discover that it no longer seems to work in Mac OS X.
The truth is, text drag-and-drop is still available in Mac OS X—but in many programs, there’s a trick to it. How you drag and drop text depends on which kind of program you’re using at the time: Carbon or Cocoa (Sidebar 4.2).
Carbon programs. In Carbon applications, drag-and-drop works as it always has: after selecting some text, position your cursor within the highlighted area and then drag it to a new spot in the word processing document (or even another word processing document).
Cocoa programs. You must keep the mouse pressed within the highlighted text for nearly a full second before you can drag it. If you don’t wait long enough, the drag won’t work.
AppleScript is a simple language that lets you devise mini-programs to perform certain tasks. For instance, you could write an AppleScript to tell iTunes to play “I Love Rock ‘n Roll” at 8:03 every morning. Or you could use an AppleScript to send an email every three hours to your co-workers telling them how many shopping days are left until Christmas. (There are plenty of frivolous uses for AppleScript, too.)
Mac OS X comes with a handful of ready-made AppleScripts, including one that checks the current temperature in your area code and one that lets you count messages in all your mailboxes.
Most Mac fans never even know they exist, however, since they’re buried in the Application → AppleScript → Example Scripts folder. Fortunately, they’re also listed in something called the Script Menu—an icon on your menu bar that puts AppleScripts at your fingertips. To make it appear, open your Applications → AppleScript folder and double-click the Install Script Menu icon (see Figure 4-13).
Some of the scripts in the Script menu operate on familiar components of the Mac OS, like the Finder, while others show off applications or features that are new in Mac OS X. Below is a listing of some of the most useful scripts.
Import Addresses lets you transport your old address book from a program like Claris Emailer or Outlook Express into the new, shiny Mac OS X Address Book (Section 11.1). The Helper Scripts are run automatically, so you never have to click them yourself.
As the name would suggest, all of these scripts work with the Finder—manipulating files and windows, for example. Several are designed to change file or folder names en masse, which can be a huge timesaver. Here are some especially useful scripts:
Add to File Names, Add to Folder Names effectively tacks on a prefix or suffix to the name of every icon in the frontmost Finder window (or, if no windows are open, on the desktop). You could use this script to add the word draft or final or old to all of the files in a certain folder, for example.
Figure 4-13. After double-clicking Install Script Menu, a new icon appears in your menu bar. You’ve just revealed the Script Menu, which lists dozens of useful AppleScript mini-programs.
Change Case of Item Names offers to capitalize, or uncapitalize, all the letters of the file names in the window before you.
Finder Windows - Hide All minimizes all open Finder windows to the Dock. Finder Windows - Show All, of course, brings them back from the Dock.
Replace Text in Item Names lets you conduct a search-and-replace of text bits inside file names, folder names, or both. When one publisher rejects your 45-chapter book proposal, you can use this script to change all 45 chapter files from, say, “A History of Mouse Pads—A Proposal for Random House, Chapter 1” to “A History of Mouse Pads—A Proposal for Simon & Schuster, Chapter 1.”
Switch to Finder brings the Finder to the front and hides all of the other running applications. (For the record, the same thing can be accomplished by Option-
-clicking the Finder’s icon in the Dock.)
You can read about folder actions in Section 2.5.12.
Current Date & Time displays (you guessed it!) the current date and time in a dialog box, along with a Clipboard button that copies the information, ready for pasting.
Font Sampler is designed to show you what all your fonts look like (see Figure 4-14).
Figure 4-14. The Font Sampler script launches TextEdit, opens a new document, and fills it with dozens of copies of the classic “What does this font look like?” test sentence: The quick brown fox jumped over the lazy dog. Then, as you watch, it formats each line with a different font, creating a page to print out and keep as a reference.
This collection of scripts communicates with Mail (see Chapter 7).
Count Messages in All Mailboxes counts all messages and unread messages in all of your mailboxes and displays the result.
Crazy Message Text is Apple at its wackiest. When you run it, a dialog box asks what message you want to send (“Happy Birthday,” for example). Mail then creates a colorful, zany, outgoing message in which each letter has a random typeface, style, color, and size. It’s ideal for making people think you spent a long time with your Format menu solely for their entertainment.
Create New Message walks you through the creation of a new message including the recipient, sender, attachments, subject, and so on. This script saves you a step if the Mail program isn’t already open and active.
The sole script here, Search Internet, prompts you for a search string (the words you want to search the Web for). When you click Search, the script opens Sherlock and runs your search. It may save you a few mouse clicks, but this script was likely designed primarily to serve as a study model by scripting hopefuls.
It’s worth noting, too, that the Script menu is nothing more than a reflection of what’s in these two special folders:
Library → Scripts. Here’s where you’ll find all of Apple’s starter scripts as described above. If you feel inspired to rename any of the commands or subcommands in the Script menu, these are the files whose names you want to edit.
Home → Library → Scripts. (If you don’t have this folder, open your Home → Library folder and create it yourself.) If you become an AppleScript fan and write little programs of your own, you can drop them into this folder to make them appear in the Script menu.
In fact, if you create a folder within the Scripts folder, you get a submenu in the Script menu, just like the ones Apple put there. (Scripts and folders in the Library → Scripts folder appear at the top of the menu; scripts in your Home → Library → Scripts folder appear beneath them.)
Screenshots are “snapshots” of a frozen moment in Macintosh time, a graphic image of the screen. Screenshots are very useful for showing somebody else an error message you’ve received, flaunting a neat desktop you’ve created, or illustrating a book of Macintosh hints.
Here’s how to capture:
The whole screen. Press Shift-
-3 to create a picture file on your desktop, in PDF format ( Section 4.3.10), of your entire screen. A satisfying camera-shutter sound tells you that you were successful. You’ll find the resulting file on your desktop, with the name Picture 1.
Each time you press Shift-
-3, you get another file, called Picture 2, Picture 3, and so on.
One section of the screen. You can capture just a rectangular region of the screen by pressing Shift-
-4. The cursor will turn in to a crosshair (see Figure 4-15, top), and when you drag and release the mouse, you hear the camera-click sound. The Picture 1 file then appears on your desktop as usual.
One menu, window, icon, or dialog box. See Figure 4-15, bottom, for the sneaky feature that lets you neatly crop a single window or icon without having to edit out the background in Photoshop afterward.
Figure 4-15. Top: If you’re interested in capturing only part of the screen, press Shift--4 to turn your cursor into a tiny + symbol. Now drag diagonally across the screen to capture only a rectangular chunk of it, as illustrated here.
The Dock. The business of pressing Shift-
-4 and then the Space bar also lets you capture the Dock in one quick snap. Once you’ve got the camera cursor, just click any spot on the Dock (between icons). The Dock background will fill with color when you’re in the right spot; if you’re not, just an icon on the Dock will be colored.
Tip
If you hold down the Control key as you click or drag (using any of the techniques described above), you copy the screenshot to your clipboard, rather than saving it as a new graphics file on your desktop. It’s now ready for pasting (in PICT format).
Mac OS X also offers another way to create screenshots: the utility program Grab (found in Applications → Utilities) offers a timer option that lets you set up the screen before it takes the shot.
If snapping pictures of the screen is part of your job, however, you should probably opt for the $29 shareware program SnapzPro X (http://www.ambrosiasw.com) instead. Simple to install and easy to use, SnapzPro has enough options to satisfy even the most advanced screenshot professional (Figure 4-16).
Every operating system needs a mechanism to associate documents with the applications that created them. When you double-click a Microsoft Word document icon, for example, Mac OS X needs to know that you want Microsoft Word to launch and open the document.
Mac OS X recognizes two different systems for making these associations:
The Mac OS 9 way. A Macintosh document’s invisible, behind-the-scenes, four-letter creator code identifies the program that will open it: MSWD for Microsoft Word, MSIE for Internet Explorer, and so on.
Each Mac OS 9 document also bears a second four-letter code: the type code. This code specifies the document’s file format. Photoshop, for example, can create graphics in a multitude of different formats: GIF, JPEG, TIFF, and so on. If you inspect your Photoshop documents, you’ll discover that they all share the same creator code but have a wide variety of type codes.
The Windows way. In Windows, every document bears a three-letter file name suffix. If you double-click something called memo.doc, it opens in Microsoft Word. If you double-click memo.wri, it opens in Microsoft Write, and so on.
The bottom line is that Mac OS X offers two different mechanisms that associate documents with the programs that created them. Mac OS X looks for type/creator codes first. Where they’re absent, the file name suffix scheme kicks in.
Double-clicking a graphics file generally opens it in Preview, the graphics viewer included with Mac OS X. But Preview can only display graphics. What if you decide to edit a graphics file? You’d want it to open, just this once, into a different program—GraphicConverter, for example.
To do so, use the Open With command. You can find it in two places:
Highlight the icon, and then choose File Open With.
Control-click the file’s icon. From the shortcut menu, choose Open With.
In any case, study the submenu for a moment (Figure 4-17, top). The program whose name says “(default)” indicates which program usually opens this kind of document. From this pop-up menu, choose the name of the program that you’d rather have open this particular file, just this once.
After opening a TIFF file in, say, GraphicConverter for editing, you haven’t really made any changes in the fabric of your Mac universe. The very next time you double-click that file, it will open once again in Preview.
If you want this particular file to always open in GraphicConverter, the steps are slightly different. In fact, there are three different ways:
Extend the one-shot reassignment method illustrated in Figure 4-17. In the Choose an Application dialog box, turn on Always Open With (Figure 4-17, bottom).
Begin with one of the techniques described above (highlight the icon, and then choose File → Open With, or Control-click the file’s icon and choose Open With). After you see the menu, press and hold the Option key. Before your very eyes, the Open With command changes to say Always Open With.
Highlight the icon, and then choose File → Get Info. Reveal the “Open with” pane, and choose a new “parent” program name from the pop-up menu.
If you want all documents of a certain type to open in a certain program—all PDFs in Acrobat Reader, all graphics in Photoshop, all HTML documents in BBEdit, or whatever—use the Get Info method described earlier. (You can’t do it using File → Open With or by Control-clicking the icon.)
If you want to make all PDFs open with Acrobat, start by highlighting any PDF file. Choose File → Get Info, and reveal the “Open with” pane.
From its pop-up menu, choose the program you want to open this kind of document from now on (in this case, Adobe Acrobat). If the one you prefer isn’t listed, use the Other option, which opens the Choose Application dialog box so you can navigate to the one you want. Find, then double-click, the program.
This time, follow up by clicking Change All beneath the pop-up menu. Mac OS X asks you to confirm by clicking Continue or pressing Enter.
From now on, double-clicking any similar kind of document opens it in the newly selected program.
Want to select all the text in a field, like the address bar in Safari or the search box in TextEdit, as quickly as possible? How’s this for quick: click the mouse with the cursor tip just below the top border of the box. One click selects all the text in the box.
When does this maneuver work? The best answer is “Most of the time.” In almost any other case, you can triple- or quadruple-click inside a box to select all its text.
Spoken text is, of course, a lifesaver for those with visual impairments, but it can be useful even if your vision is 20/20! For instance, when listening to a document, any typos become immediately apparent.
In Mac OS X, Cocoa applications have always had the ability to easily speak a selection of text. Simply highlight some text, then choose Application menu → Services → Speech → Start Speaking Text. Unfortunately, there was never an easy way to get spoken text out of some non-Cocoa applications, including Microsoft Word.
Thanks to advances in Mac OS X 10.3’s Speech preference pane, however, you can now hear spoken text from any Mac OS X program, including Carbon and even Java-based applications. To do so, open the Speech pane in System Preferences, and click the Spoken User Interface tab. In the “Other spoken items” section, turn on “Selected text when the key is pressed.”
The dialog box that now appears is where you can define your own hot key to speak the selection. To prevent conflicts with existing shortcuts, use something relatively obscure, such as Shift-Option-
-S. If you ever want to change this shortcut, just press Set Key.
Tip
While you have the Speech preferences panel open, you may wish to click the Default Voice tab and select another voice. Vicki and Victoria are the easiest to understand.
Once you’ve set it up, you’ll be able to highlight text in any application, hit your defined key combination, and listen to a spoken version of the selected text.
Get Mac OS X Power Hound, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.