Derek’s Applescripts

I own a Macintosh and I have to say that I just love AppleScript. Talk about a language long overdue. Pointing and clicking is nice, but once in awhile, you've got to write some code to do what's necessary.

The AppleScripts here have been saved as “Compiled Applications”, which means that as soon as you unpack them, you can start using them.

AppleScript works by telling scriptable applications what to do. Therefore, some of these scripts depend on certain third-party applications:

Because the scripts are so small, I put the entire package into one ZIP file. Throw away any you don't want or need!

Script Name Description Requirements
BBEditize Changes the creator of the given files to BBEdit Lite (from Bare Bones Software). Example of how to write AppleScripts for performing batch “type changes”. BBEdit Lite, if you want to read the files afterward.
Catch the Bus
Catch the Bus (7 to 3)
AppleScripts I wrote to help me catch various buses on time. Example of how to write “daemon” scripts that run in the background and monitor some condition. Just the Finder.
Remove Line Feeds When you've got a batch of PC text files that you want to “Mac-ize”, drag them onto this script. Example of a script that modifies a file's contents. None.
Save Clipboard as Text What it says. This may seem like a trivial operation, but when you're doing this a lot with an app that doesn't do text clippings, this script saves a little mousing on your part. Scriptable Text Editor (comes with AppleScript).
Set Creators
Show Creators
Boy, I use these a lot, especially with stuff I download off the Web. Yes, ResEdit lets you do the same thing, but as with “Save Clipboard as Text”, these scripts are a tad more direct. Just the Finder.
Trash Files
Unlock Files
Now it looks like I'm getting carried away. Certainly these are easier to do from the Finder directly, right? Well, unlocking files is hard to do in “batch” otherwise, and “Trash Files” is nice to have on the Apple menu when the desktop Trash can is covered by an open Finder window. Just the Finder.
Incremental Backup

This one you must modify to make it useful to you, as it contains properties with explicit directory names in them, names of directories that should be incrementally backed up. This is my “workhorse” AppleScript; I run it every day.

I have to admit that it's kind of fragile-- it expects that all of the directories in the properties exist, etc. Definitely a script built for my own personal use.

Finder, Scriptable Text Editor.
Drop Kick Thru Firewall
Refresh Via Firewall

I can't FTP into my company via the firewall, but I can FTP back to myself! These scripts reverse the sense of the FTP. dataComet is wonderfully scriptable. BetterTelnet is there just to provide an FTP server for my Mac.

For “Drop Kick”, just drop the files onto the icon. “Refresh” assumes that the dropped file(s) have the appropriate creator and type.

In a given run, all files must be either ASCII or Binary, and neither script detects if something went wrong on the remote side. Caveat emptor.

BetterTelnet PPC, dataComet
Notify Me When Done Great for when you're telecommuting and you need to run a long job on the remote host: this script brings dataComet to the front when the job is done. You just supply the prompt you're expecting. dataComet
Pass It On Trivial Eudora Light script that passes the dropped-on file(s) as attachments to the given recipients. More of an example than anything. Eudora Light
View HTML in Message Yeah, I know everyone reads mail in Netscape now, everyone except me. When I receive HTML email, I invoke this script, which passes the body of the message onto IE 3.01. Eudora Light, Internet Explorer
Shredder Uses PGP 2.6.2 to utterly wipe the contents of the given files from your disk. MacPGP 2.6.2
Decrypt/Verify
Encrypt/Sign
Integration between Eudora Light and MacPGP 2.6.2, for sending and receiving public-key-encrypted messages Eudora Light, MacPGP 2.6.2