Mac OS X Scripts

This is a collection of scripts I wrote for Mac OS X. Most of the scripts are pretty simple; I post them here in the hope that someone will find them useful. All scripts run on OS 10.2.6. I have not tested them on other versions of the OS. Unless otherwise stated, the software is in the public domain.

/usr/bin/mail replacement

This Perl script is a drop-in replacement for /usr/bin/mail that uses Mail.app (via an applescript) rather than sendmai or postfixl to send mail, thus saving me the effort of configuring sendmail. Unlike /usr/bin/mail, you can't use it for reading mail. Because it has to connect to Mail.app, this script will only work if you have the GUI running. I installed it in ~/bin/mailx.

Download version 1.0.3, 17 Sep 2003

Enable/disable selected songs in iTunes

This pair of applescripts sets or clears the checkboxes on selected songs in iTunes. Install in ~/Library/iTunes/Scripts. These are no longer needed for more recent versions of iTunes.

Download Enable Selection
Download Disable Selection

Canonicalize phone numbers in Address Book

This applescript converts all phone numbers in the Address book into US style 333-333-4444 format and drops leading 1s. The script assumes the area code is 607; use Script Editor to change it.

Download