Schedule Fetch to Work Automatically
Although Fetch doesn't have a built-in scheduler, you can use iCal along with Fetch's Mirror command or Automator support to automatically upload or download files at a specified time. To find out how...
Written by
Tonya Engst
Recent TidBITS Talk Discussions
- Alternatives to MobileMe for syncing calendars between iPad/Mac (1 message)
- Free anti-virus for the Mac (20 messages)
- iTunes 10 syncing iPod Touch 4.1 (2 messages)
- Thoughts about Ping (16 messages)
Published in TidBITS 996.
Subscribe to our weekly email edition.
- Watch Apple Events Online
- AT&T Reveals Details on 3G MicroCell Home Base Station
- Google Acquires CAPTCHA Service
- New iPod Touch Has 802.11n Chip
- Preventing Duplicate Calendar Events in iPhone OS 3.1
- Protecting Snow Leopard's Namesake Cats
- Exploring Widespread SuperDrive Problems
- TidBITS Watchlist: Notable Software Updates for 21-Sep-09
- ExtraBITS for 21-Sep-09
- Hot Topics in TidBITS Talk for 21-Sep-09
Improve Snow Leopard's Autocorrection Capabilities
Mac OS X 10.6 Snow Leopard includes a number of new text-related features, including automatic spelling correction and text substitution. These features are supported in Apple-supplied applications like Apple Mail, Safari (in text areas), TextEdit, and AppleScript Editor, along with independent applications that use the appropriate Apple technology - relatively few at the moment, but more are undoubtedly on the way.
(One tip: The automatic spelling correction is seldom enabled by default. To turn it on, make sure the insertion point is somewhere where text can be entered, and either choose Edit > Spelling and Grammar > Correct Spelling Automatically or, if the Edit menu's submenu doesn't have what you need, Control-click where you're typing and choose Spelling and Grammar > Correct Spelling Automatically from the contextual menu that appears. The latter approach is particularly likely to be necessary in Safari and other WebKit-based applications, like Mailplane. Text substitution doesn't need to be turned on.)
The automatic spelling correction compares what you type with words in Mac OS X's internal dictionary, automatically replacing mistakes with what it believes you meant to type. The text substitution feature relies instead on replacement pairs - a specific mistake coupled with a specific replacement.
As a result, although the automatic spelling correction can fix mistakes that no one would have anticipated, it can also guess incorrectly. In contrast, the text substitution feature knows only about the mistakes you've taught it, but it will always do the right thing when you make a known mistake.
So here's the problem. Let's say you type the text "wth" because you want to enter the word "with". Snow Leopard's automatic spelling correction replaces "wth" with "wt." for some reason, causing you more work than if it had done nothing at all.
Luckily, Snow Leopard's text substitution feature overrides the automatic spelling correction, so if you create a replacement (in the Text view of the Language & Text pane of System Preferences) that replaces "wth" with "with", that mistake will be corrected properly in the future.
Unfortunately, Apple's replacement dictionary has very few entries and adding them is tedious, so I set out to find where and how they are stored, enabling me to bolster them with the public domain TidBITS AutoCorrect Dictionary initially created for use with Eudora (see "An ATypoKill Eudora Hack," 2000-09-04). (Subsequently, the TidBITS AutoCorrect Dictionary has been made available for Typinator, TextExpander, and TypeIt4Me, which also offer many other capabilities beyond Snow Leopard's.)
[Editor's Note: Testing the automatic spelling correction feature in Snow Leopard has been extremely frustrating. It doesn't seem to work all the time when you intentionally type misspelled words, and it doesn't always kick in instantaneously. The feature is certainly a help in general, but right now, the connections feel a little loose. -Adam]
The Basics -- After a little digging, I found that Apple stores the replacement pairs in an invisible file at ~/Library/Preferences/.GlobalPreferences.plist, and the pairs have a data structure that looks like this:
<dict>
<key>on</key>
<integer>1</integer>
<key>replace</key>
<string>wth</string>
<key>with</key>
<string>with</string>
</dict>
Next, I took the TidBITS AutoCorrect Dictionary, reformatted it to the appropriate structure, and pasted it into the .GlobalPreferences.plist file. To test it, I typed a few of the typos in the file into TextEdit, and watched them be replaced.
The only question is if putting over 2,700 replacement pairs into the .GlobalPreferences.plist file will impact performance, particularly on slower Macs. In initial usage on several machines, including a Mac Pro (Early 2008) and a 2009 MacBook Pro, it has seemed fine, though there was a bit of a slowdown on a Mac Pro (Early 2006). Leave a comment if you see any performance problems after adding all these entries to your .GlobalPreferences.plist.
Do It Yourself -- If you would like to try this out yourself, TidBITS has made my reformatted TidBITS AutoCorrect Dictionary available for download.
Once you've downloaded and expanded the file, follow these step-by-step instructions using either BBEdit or the free TextWrangler, also from Bare Bones Software. (The .GlobalPreferences.plist file is saved as a compressed plist, so a program like TextEdit or vim/nano won't be able to read it properly without additional steps.)
- Open the Language & Text preference pane.
- Click the Text button to switch to the Text view.
- Click the + button and add a new replacement. I suggest "teh" and "the".
- Open the reformatted TidBITS AutoCorrect Dictionary in BBEdit or TextWrangler, select all (Command-A), and copy the text to the clipboard.
- In BBEdit, choose File > Open Hidden.
- Navigate to your home folder, then Library, then Preferences and select the .GlobalPreferences.plist file.
- In that file, find the replacement pair you added (search for "teh").
- Select the entire dictionary entry (from dict to /dict).
- Paste the contents of the linked file from before over the "teh" dictionary entry.
- Save the .GlobalPreferences.plist file.
- Log out and log in again, or restart. (This may not be necessary, but be sure to do it if the replacements don't seem to work.)
Voila! From now on the replacement pairs in the TidBITS AutoCorrect Dictionary will be used in favor of the automatic spelling correction feature's potentially incorrect guesses.
(Another tip: If the automatic spelling correction repeatedly changes something you're intending to type, such as replacing "foo" with "of", create a replacement pair in the Language & Text preference pane's Text view that replaces "foo" with "foo". Hopefully that will keep the automatic spelling correction off your case.)
If Things Go Awry -- If you find that adding more than 2,700 entries causes typing performance in Apple Mail or TextEdit to be too slow, you can always go back to the Language & Text preference pane and click the Restore Defaults button to revert to the minimal list that Apple provides.
[Lewis Butler is a longtime Unix system admin, postmaster and Mac geek. He is a frequent contributor to a large number of mailing lists under his "LuKreme" alias.]
![](/file/11593/db.tidbits.com.tar/db.tidbits.com/images/badges/web-crossing.gif)
Create a complete social network with your company or group's
own look. Scalable, extensible and extremely customizable.
Take a guided tour today <http://www.webcrossing.com/tour>
defaults write -g NSUserReplacementItems -array-add '{ "on" = 1;
"replace" = "macgyver"; "with" = "MacGyver";}'
However, this method adds the items to the list unchecked (disabled). However, it doesn't require a text editor and is easily scriptable. If anyone figures out how to add the items so they are actually enabled, let us know.
Resorting to XML notation works better:
(woops, it seems I'm having trouble with the comment form that kills angled brackets -- if necessary, check http://pastie.org/621995).
defaults write -g NSUserReplacementItems -array-add '<dict><key>on</key><integer>1</integer><key>replace</key><string>macgyver</string><key>with</key><string>MacGyver</string></dict>'
For the record, I just copied the .GlobalPreferences.plist file's format.
When Spell Catcher finds an error, it puts up a dialog with suggested fixes. You can add the word to the dictionary or enter a new autocorrect or abbreviation entry. There are keyboard shortcuts for everything. It's INTELLIGENT.
Rainmaker says it works in Snow Leopard, but for me it keeps turning itself off. Because it's an Input Source, it works only in 32-bit programs. Needs work. Maybe they could turn it into a better front end for the new Snow Leopard feature. Better idea: Apple should buy it.
Finally, why in the world did Apple put this in the Global Preferences file? Sounds like an invitation to disaster.
http://www.rainmakerinc.com/kb/index.php?article=97
Does anyone using a localized system discover similar problems?
~/Library/Spelling/LocalDictionary
In OS X 10.5, this file was NOT a plain text file. If you would like to get your old dictionary entries out of the old file (~/Library/Spelling/en) you can run this shell command:
perl -pe 's/\000/\n/g' /path/to/old/en >> ~/Library/Spelling/LocalDictionary
Make backups first, of course.
I'd share mine, but it consists largely of names of people I know and obscenities :)
If you use multiple languages, you likely have multiple files, and if your primary language is not English, the old file will not be named 'en'.
cat ~/Library/Spelling/LocalDictionary >> ~/Library/Application\ Support/Firefox/Profiles/.default/persdict.dat
Looks like it works. Despite being a .dat file the Firefox file is also a straight ASCII file.
Could I use XCode for this?
Sorry if this seems ignorant I'm just learning about this side of the mac... And trying to teach myself.
That shortcut will enable you to view invisible files.