Cancel the shut down command
It’s happened to us all: you tell your machine to shut down, and then you remember that there’s one last thing you need to do—send an e-mail message, check the weather forecast, or pay a bill online, say. Once the shutdown process has started, you may think you’re out of luck. There’s no obvious way to cancel. But you can do one of two things to stop it. Either should work, assuming that you have enough applications open to slow the shutdown process.
First, try launching a program from the Dock—preferably a large one, such as Adobe Photoshop CS, that takes a bit of time to open. Launching an application cancels the shutdown. You can also stop it by opening a Save dialog box in any application. When you realize that you want to cancel your shutdown, use Command-tab to switch to an application that’s still running, and then try pressing Command-shift-S to invoke the File: Save As command. (This shortcut works in some, but not all, apps.) The shutdown process will stop as soon as it reaches the program with the open Save As dialog box.
Change which application opens a file
Do you have a particular .doc file that you always want to open in Apple’s Pages instead of Microsoft Word, or a PDF file that you want to edit in Adobe’s Acrobat Pro rather than in Apple’s less-powerful Preview? Sometimes the default application just won’t do. Unfortunately, it’s tiresome to use the Finder’s Get Info window to control which application always opens a certain type of file. You must select the file, press Command-I, click on the triangle next to the Open With section, and then click on the pop-up menu to choose the desired application. Finally, you have to close the Get Info window. Ugh.
You could, of course, use the contextual menu in the Finder to open the document one time—control-click on the document and choose Open With from the pop-up menu. However, you’ll have to take the same steps every time you want to open the document—it’s not a lasting solution.
This problem has an easy answer—a quick way to change the Always Open With setting for a given file. Control-click on the file, but don’t select Open With from the contextual menu just yet. Instead, press and hold the option key. The Open With menu item changes to Always Open With (see “Always Open”). Select this item and then choose the application you’d like to use from the list. Bingo!
Zip through podcast lists
Click on Podcasts in Apple’s iTunes 7 Library list to reveal a list of every podcast you’ve downloaded. Look closely, and you’ll see the standard Mac disclosure triangle to the left of each podcast’s title (see “Podcast List”). Click on one to show episodes within that podcast. But you probably already knew that. So here’s the hint—two hints, actually.
First, if you hold down the Command key when clicking on any podcast’s triangle, then every podcast in your list will expand to show episodes; Command-click again, and they all collapse. Second, if you ever remove episodes from the list (just highlight one and press delete to remove it), you can get the full episode list by option-clicking on the disclosure triangle. iTunes queries the server and downloads the information for any missing episodes. Click on the Get button to retrieve the files again.
You can even combine these two tips—hold down Command-option and click on a disclosure triangle. Every podcast in the list will expand, and iTunes will download all missing episode details again. Note that this action will download episode information for any podcasts in your list—even those you don’t currently subscribe to.
Edit smart playlists
Do you use a lot of smart playlists in iTunes? Are you constantly tweaking them to get them just right? If so, here’s a quick way to edit them—quicker even than using the control-click contextual menu. Just option-click on the smart playlist you’d like to edit, and the Smart Playlist editing window will instantly appear.
Drag and drop to Dashboard widgets
If you’re using Mac OS X 10.4, here’s something you may not have realized about Dashboard: many of its widgets support drag and drop. To drag text and images to Dashboard, just click and hold on the object or text you wish to drag, start dragging, press F12 to activate Dashboard, and then navigate to the desired widget’s work area and drop the selection. Note that the widget must already be open—you can’t open a widget from the Dashboard bar while dragging something.
So when might you want to do this? Suppose you’re browsing the Web, looking for information on some recent event in Spain. You don’t speak Spanish, but one of the links leads to a Spanish-language Web site. Highlight the text you wish to translate and drag it into the Translation widget (assuming you have the widget set to translate Spanish into English, of course). Or say you need to look up words in the dictionary. OS X has a great built-in dictionary feature (control-click on a word and choose Look Up In Dictionary from the pop-up menu), but it doesn’t work in every application. If you’re in an unsupported application, such as Microsoft Word, highlight the text you wish to define, drag it, press F12, and drop the word into the Dictionary widget’s search field. Presto! You have an instant definition (see “Define a Shortcut”).You can streamline this process even more by using a multibutton mouse—assign one of the buttons to activate Dashboard, via the Dashboard & Exposé preference pane (or by using your mouse’s control software to assign F12 to a button). Now you can click on and drag the text (hold that mouse button down!), and then drop it onto the desired Dashboard widget.
Speed up Dashboard
The problem may start slowly—each time you activate Dashboard, the process takes a bit longer or you experience delays when working with certain widgets. One day you realize that Dashboard is just plain slow.
Why? As you work with various widgets, the Dashboard application caches information. In other words, it creates a local copy of widgets’ data. If you need to access that data again, the cache should make the process faster by sparing Dashboard a trip to the Internet. But in some cases, it takes longer to read the cache file than it would to go get the data again.
The solution is to throw all of Dashboard’s cache files in the Trash and then empty the Trash. You’ll find the files in your user folder/Library/Caches/ DashboardClient. After doing this, you’ll need to restart the Dock, as that’s the program that controls Dashboard. You can do this by using Terminal or Activity Monitor (both in /Applications/Utilities). In Terminal, just type
killall Dock. In Activity Monitor, type
dockinto the program’s search box, click once on the Dock process, click on the Quit Process button, and then click on the Quit button in the resulting dialog box. In either case, the Dock will restart automatically; after it does, try loading Dashboard and see if it runs any faster.
If this technique works and you’d like to permanently prevent Dashboard from creating cache files, that’s quite simple to do, too. Navigate to the DashboardClient folder, select it, and then open the Get Info window (Command-I). In the General section of the Info window, click on the Locked check box. Once the folder is locked, Dashboard won’t be able to write to it any more. (Obviously, to reverse this, just open Get Info again and deselect the Locked option.)
Always Open: To change the program that always opens a file, control-click on the file and then press option. In the contextual menu, Open With will be replaced by Always Open With. Podcast List: With a couple of keyboard shortcuts, you can quickly expand and contract your full list of podcasts, as well as retrieve the complete list of episodes—even if you’ve deleted some of them. Define a Shortcut: It’s a drag that programs such as Microsoft Word don’t support OS X’s Dictionary. But you can get around that by dragging and dropping text from the program straight into the Dictionary widget. Take Out the Trash: Has Dashboard slowed to a crawl? Try emptying its cache.Add AppleScript support to Preview
Apple’s scripting language, AppleScript, is a powerful tool for automating the things you do most often. (For AppleScript basics, see “Using Tiger: Learning AppleScript” at macworld.com/2343.) So it’s surprising that Apple’s own Preview—the Mac’s default application for opening most images—doesn’t support it.
With some know-how, an intrepid user can fix that. You won’t get perfect or complete AppleScript access, but you will gain the basic suites—Standard Suite, Text Suite, and Type Definitions. With these working, you can create time-saving scripts that manipulate windows, print images, open and close files, and so on.
So how do you add AppleScript support? Probably the quickest way is to use Terminal. Open Terminal (/Applications/Utilities) and type this command (or copy and paste it ):
defaults write /Applications/Preview.app/ Contents/Info NSAppleScriptEnabled -bool YES
That’s it—not too hard, was it?
What did you actually do? You just told the system to modify the Info.plist file for Preview by adding one Boolean (YES or NO) variable (
NSAppleScriptEnabled) and setting it to YES—in other words, enabling it. Just that will gain you a fair amount of AppleScript functionality in Preview.
To see an example, open an image with Preview and then switch to Script Editor (/Applications/AppleScript). Type this command and click on Run:
tell application "Preview" close window 1 end tell
The Preview window will vanish. Nice!
To use an advanced Preview script that takes advantage of the newly added AppleScript support, go to the Red Sweater Blog.
Spring into action
If you’re new to the Mac, you may be surprised to discover that all OS X folders have a built-in spring mechanism. No, they don’t bounce like cars on a dirt road. Instead, they spring open when you need them to—no clicking required. This greatly eases the task of filing things. There’s no need to open two windows to see the source and the destination at the same time. Instead, pick up the item you wish to file, and use spring-loaded folders to navigate to the destination. Here’s how it works.
The Basics A spring-loaded folder is nothing more than a folder that opens automatically and shows you its contents when you drag something onto it—drag and hold, that is, not drag and drop. Try it: click and hold on a file on your desktop (or elsewhere). Keep holding the mouse button down and drag the file over to any folder. Now wait (keep holding that mouse button down!). After about a second or so, the folder over which the cursor is hovering will open, revealing its contents.
Exactly what you see depends on which Finder view mode you’re using. In both the Icon and the List views, OS X will open a new window showing the folder’s contents. In Column view (my favorite), the folder’s contents will become visible in the next empty column.
Keep holding down the mouse button to dive deeper into your hard drive. After the first new window opens, find another folder and drag your file over it, wait a second, and watch it open. Releasing the mouse button will move whatever file you’ve been dragging into the frontmost window. But if you don’t want to move the file you’re dragging—or if you change your mind—you can cancel at any time by pressing the escape key. The dragged file will disappear from under your mouse and return to its original location. (You must press escape while you’re still holding down the mouse button.)
Ways to Speed Things Up If you do this often, though, you’ll soon be frustrated by that one-second delay each time you open a folder on the way to your destination. You can hurry things up by going to Finder: Preferences and clicking on the General tab. At the bottom of the window, you’ll see a Delay slider that controls the length of the delay before a spring-loaded folder pops open.
Even if you’re looking for speed, I don’t recommend moving this slider all the way to the left toward Short. Folders will accidentally pop open all the time as you drag objects around, and—trust me—this is a real pain.
So here’s my remedy. It requires an extra key press, but it removes all question as to which folder you wish to open. To gain complete control over spring-loaded folders, turn the feature off. That’s right; deselect the Spring-Loaded Folders And Windows option in the General tab of the Finder Preferences window.
Once you do, you’ll be able to pop open any folder without delay: just drag an object onto the folder, press the spacebar (while still holding the mouse button down), continue to the next folder, press the spacebar again, and so on. This makes the process both fast and accurate.
[ Senior Editor Rob Griffiths runs MacOSXHints.com. ]