AppleScript to add week numbers in Entourage

| | Comments (0) | TrackBacks (0)

Just finished an AppleScript for Entourage 2008 to add week numbers to the default calendar.

The script actually creates all-day events with each set to “Free” status and includes each Sunday’s ordinal date.

numberedweeks.jpg

While the script isn’t very long, it was a learning experience. I like to use handlers in AppleScript so that I can create a list of actions first and then write the code later. But I ran into a very strange problem doing this. I could add the script to the Entourage Script Menu Items list and run it once. Every subsequent run would fail. This happened until I recompiled the script and regardless of whether or not I ran the script from within Entourage or from the Script Editor.

The fix was simple. I removed the handlers and created a straight-through script that runs from top to bottom. Doing so only took a few minutes and then the script began running reliably.

I’ve sent it to Diane to test.

 

0 TrackBacks

Listed below are links to blogs that reference this entry: AppleScript to add week numbers in Entourage.

TrackBack URL for this entry: http://blog.talkingmoose.net/cgi-bin/mt/mt-tb.cgi/18

Leave a comment