Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Change the sample rate of audio on the optical out port System
I used to have my home theater receiver hooked up to my Mac Pro via the optical connection, and for a long time, enjoyed listening to my music in an emulated surround mode through Dolby Pro Logic on the receiver. Since moving into a new apartment, however, I had been using normal stereo mode.

When I finally switched back to my 5.1 setup, I found I could no longer have my music mixed to five channels! For whatever reason, Leopard was outputting my audio at 96 KHz, which was above what my receiver could process. In order to fix this, use the Audio MIDI Setup application found in the Applications » Utilities folder. Use the Properties For drop-down to choose Optical Out, and then down in the Audio Output section, choose 48000Hz for a format. Restart any running applications using audio and play with your receiver; you should be able to use Pro Logic now.
  Post a comment  •  Comments (3)  
  • Currently 2.17 / 5
  You rated: 5 / 5 (6 votes cast)
 
[14,317 views]  View Printable Version
An AppleScript to ease fast user switching System
With kudos here and there, I now present my working version of an easy Fast User Switching AppleScript that switches passwords with a double-click, and even types the password for you.
  1. Enable support for Assistive Devices in the Universal Access System Preferences panel.
  2. Change the password string to the password of the user account you want to switch to.
  3. Name the script like the short username of the user you wish to switch to.
  4. Save the script as an executable, to allow easy double-click operation.
I use two users (with the same password) on my computer for different usage types (one for general stuff, the other for music production). I keep two versions of the script in the Applications folder, each assigned to one user. In this way, I just have to type the user name I want to switch to in Spotlight, press Return, and voila.

The script: For your convenience, I've also created an AppleScript application bundle version (32KB download), complete with icon. Just open like a normal Script in Script Editor (in 10.5 at least), put in your password, rename to the short user name, and enjoy the icon.

[robg adds: I haven't tested this one, and note that storing account passwords in a plain text file on your drive is at least something of a security risk. You could mitigate that issue somewhat by keeping your scripts on an encrypted disk image, though this will make using the scripts a bit less convenient.]
  Post a comment  •  Comments (7)  
  • Currently 2.56 / 5
  You rated: 5 / 5 (9 votes cast)
 
[18,984 views]  View Printable Version
Automatically eject/mount disks on sleep/wake System
Using a laptop with permanent external drives can be a bit annoying when you leave the desk -- you have to manually eject all your devices, otherwise you get that dreaded 'Device Removal' dialog. With a little bit of Terminal magic, though, you can automatically eject disks when you sleep the laptop, meaning you can just put the lid down and go. Disks are also reconnected automatically on wake, for when you're just sleeping the computer without going places.

It's all thanks to a little utility by Bernhard Baehr called SleepWatcher, which runs in the background and is triggered by sleep and wake events, calling scripts to perform required actions. Download and install SleepWatcher and its StartupItem. Next, you're going to create ~/.sleep and ~/.wakeup files which SleepWatcher will call upon.
read more (137 words)   Post a comment  •  Comments (15)  
  • Currently 2.86 / 5
  You rated: 1 / 5 (14 votes cast)
 
[65,971 views]  View Printable Version
View Spotlight indexing task's percentage completion System
This hint is perhaps obvious, but I didn't see it anywhere and it can be useful to know.

If you click on the Spotlight menu bar icon, it will tell you what it estimates the remaining time to create the index will be (i.e., "About 5 hours remaining"). If you hover your mouse over the Spotlight menu bar icon, however, it will tell you a percentage completion figure instead ("Indexing volumes. (6% done)").

A percentage can be nice because OS X's estimate isn't always that good.
  Post a comment  •  Comments (1)  
  • Currently 1.86 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[8,362 views]  View Printable Version
Manually specify desired timeserver System
It did not occur to me until now that it actually is possible to edit the server field in the Date & Time preferences window and that it is thus possible to use any timeserver one would want to use -- not just those provided by Apple. Just select the existing text and type the address of the server you want to use.
  Post a comment  •  Comments (11)  
  • Currently 2.25 / 5
  You rated: 3 / 5 (8 votes cast)
 
[21,386 views]  View Printable Version
Remove anti-aliasing from accessibility zoom System
Normally when you use the zoom feature it interpolates pixels so that at high zooms it looks incredibly blurry. However, the key-combination Option-Command-\ will turn off this feature so that you can zoom fully without blurriness.

[robg adds: This is documented in one of the choices on the Options screen of the Zoom section of the Seeing tab of the Universal Access System Preferences panel. But I'm not sure how many folks have ever drilled down into that panel, so I decided to run this one...]
  Post a comment  •  Comments (4)  
  • Currently 1.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[7,459 views]  View Printable Version
Insert non-breaking spaces System
I'm not sure how far back this goes, but on Leopard at least, pressing Option-Space on the US or US Extended keyboard layouts inserts a non-breaking space (U+00A0) rather than a normal space (U+0020). This might be useful for some people; unfortunately there seems to be no simple shortcut for inserting non-breaking hyphens on either of these two keyboard layouts.
  Post a comment  •  Comments (8)  
  • Currently 2.25 / 5
  You rated: 2 / 5 (8 votes cast)
 
[22,771 views]  View Printable Version
Run scripts via the Script Menu via keyboard System
I work with image files and I have many scripts and Automator workflows to handle and modify them. Lots of these actions are assigned to Quicksilver keyboard shortcuts, as I hate using the trackpad. Unfortunately it's difficult (for me) to remember all the keys, and I'm also running out of keyboard! So this tip assigns a keyboard shortcut to the script icon in the menu bar, and allows you to easily select the scripts/workflows within by keyboard. It will work with most apps.

First, open AppleScript Utility in /Applications » AppleScript, and activate Show Script Menu in menu bar and Show application scripts at: top. Then, holding Command, drag the Script icon in the menu bar as far left as you can (it won't go past certain installed apps' icons).

Next, in the Keyboard Shortcuts tab of the Keyboard & Mouse System Preferences panel, enable (and change if desired) the shortcut for Move focus to status menus in the menu bar (in the Keyboard Navigation section; I used command-F2). This shortcut will now open the Scripts menu (because it's leftmost) first from within most apps.

Download Add Front App to Menu.scpt. Open the script. This creates a folder for Script Editor in ~/Library » Scripts » Applications. Then move the Add Front App to Menu script to ~/Library/Scripts. Using the menu bar script menu, you can now add a script folder for any frontmost app to ~/Library » Scripts » Applications. Let's add the Finder first. Make sure Finder is frontmost, then run that script from the Scripts menu.

Now (nearly there) copy some Finder-friendly scripts or workflows to ~/Library » Scripts » Applications » Finder, and rename them so the first character of each is unique. This way, when the menu bar script menu is open, you can highlight the right script with just one key press. If you have lots of scripts starting with the same word or letter, put a different number at the front of each filename, e.g. file-jpg.scpt and file-png.scpt become 1file-jpg.scpt and 2file-png.scpt. Now you can run any number of scripts or workflows in just three key presses -- and without having to remember lots of shortcuts. Happy button pushing!
  Post a comment  •  Comments (15)  
  • Currently 2.38 / 5
  You rated: 3 / 5 (8 votes cast)
 
[28,295 views]  View Printable Version
Display system uptime in a Finder dialog System
I was thinking that there must be an easier way than going to Terminal and typing uptime in order to find out how long my machine had been up. So I wrote a wee AppleScript that gives the answer in the form of a Finder dialog window. Stick this into Script Editor, and save it as Application (or Application Bundle).
set output to do shell script "uptime"

tell application "Finder"
    display dialog output buttons {"OK"} default button 1
end tell
If you wish, you can then add a shortcut to it from your launcher. Voila, uptime and load averages at your findertips (literally).

[robg adds: This is a very simple hint, but one that demonstrates to new AppleScript users how to display the output from any Terminal command in a dialog. For uptime, and many other Terminal commands whose output I'd like to see on occasion (such as the results of the last Time Machine backup), I use GeekTool, as described in this Pick of the Week entry. (And yes, that feature will return in some form shortly...).]
  Post a comment  •  Comments (7)  
  • Currently 1.60 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[15,002 views]  View Printable Version
Change the default text for just about everything System
This is a hint which will allow you to change the default text for just about anything. This is actually quite easy -- all you need to do is edit various *.strings files. The thing is, these .strings files can be found just about everywhere. Here are some good places to look:
  • /System » Library » CoreServices/
  • Control-click on an application, choose Show Package Contents on the pop-ip menu, then navigate into Contents » Resources » [your language].lproj.
A few points:
  • If the string you replace is too long, it will just be truncated and look a bit odd.
  • Some strings don't appear to work anyway. I've no idea why.
  • The strings files have comments in them. For example, search for OD_8 in /System » Library » CoreServices » Finder.app » Contents » Resources » English.lproj » Localizable.strings.
  • Many applications will need to work on a copy, as they cannot authenticate a save.
  • %@ is often an interesting thing to try.
  • To insert a quotation mark, use \\", and to insert a backslash, use \\\.
Read on for an example to get you started...
read more (229 words)   Post a comment  •  Comments (13)  
  • Currently 1.80 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[9,670 views]  View Printable Version