Applescript is a very smart technology that lets you pilot, through scripts, most of the functions of the MacOS as well as that of a large number of applications. It is extremely useful in getting rid of repetitive tasks. In fact, the second time you do something on your mac, it's time to start thinking about scripting it...

There is however one problem, it is the lack of information. There are some books, and quite good, on the applescript language for the MacOS. But scripting the OS is just a small fraction of what you will want to script. What you will really want to do is write scripts that interact with other applications. And there you will realize that it would be really great to have a good documentation on how these applications can be manipulated with applescript. This does not exist. At least, I have not been able to find it. The second way to learn is through examples. I learned a lot through scripts that I have found here and there, so I put my own on display here. They're not really of professional quality, but I guess that they contain some valuable information on how to script some applications.

For each script, there are two links. If you are acessing this page on a Mac, use the script icon, otherwise use the text document icon. Note that the scripts are written form MacOS 9.1, I have not switched yet to MacOS X.


send 1 by 1 (using Excel and Eudora)

This is a script that I wrote to send a given mail to a large list of people. I could not find a mailer that would react correctly to the fact that there is always an adress that hangs. You're never sure of who in the list has received the mails, you are forced to edit your list to make sure that no-one gets the mail more than once. That's why I wrote this script that sends one email using Eudora to all the people listed in an Excel table. This script handles attachments. The only thing I have not been able to do is to change the sender's personality, if you know how to do it, let me know.

get the applescript

get the applescript as text


update proceedings (using Fetch and the Finder)

I wrote this script to automatically backup a proceedings site: authors write their papers and place it on a directory they create on a FTP site. What I wanted to have was a script who would go and check the ftp site and download only the new or updated directory to my Mac. It is not finished because I've found out that on the unix ftp site, modifying the content of a directory does not change the modification date of the directory, so I need to get the modification date of the elements of the directory. The finder is scripted to get the elements already on the Mac, and Fetch is used for all the remote business.

get the applescript

get the applescript as text