How to find and replace multiple strings in a text file?

I’ve been blogging about Mac stuff at http://www.vincentpace.info/mac/. If you look there, you’ll see I like to make links for everything. Up until now, I’ve been using the text editor’s find and replace functions to insert links wherever a word that I want to have a link appears.

However, I’ve been looking for an easier way to do this. So I’ve been trying to figure out how to write an AppleScript that will automatically change all occurrences of:

Apple
Mac OS X
iCal
etc.

to

Apple
Mac OS X
iCal
etc.

I’ve been trying to make an AppleScript that I can just run everytime after I’m done writing an entry and it’ll change everything. Unfortunately, as a total AppleScript noob, I’ve been unable to pull anything off. Can anyone help???

The following script will do what you want. Simply copy your text to the clipboard, run the script, and the text on the clipboard will be replaced with the links. You can add to the search and replace list for more conversions:

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]