Automating Internet Sharing on OS X Snow Leopard
It’s been bothering me for quite a while ever since I used OmniFocus on my iPhone more that I can’t easily activate Internet Sharing to sychronise OmniFocus on my Mac and iPhone. Here’s what I always had to do:
- Move the mouse (or use Spotlight/QuickSilver) to bring up the System Preferences.
- Press Sharing.
- Press Internet Sharing.
- Check Internet Sharing.
- Press Turn AirPort On.
- Click Start.
That’s at least 6 steps too many, and the friction makes me reluctant to synchronise my apps.[1]
I researched a bit and found a piece of AppleScript that can be used to enable Internet Sharing. I updated it to work for Snow Leopard, created a OS X Service for it using Automator. I also modified the script so that running it again turns Internet Sharing and AirPort off.
2 clicks. Tada!
[1] I don’t want to keep Internet Sharing on all the time because, there’s a OS X bug that makes the CPU hit 100% and I’ll have to disconnect by pulling out my HSDPA modem, put it back, wait a while and then connect again.