On May 04, 2012, at 08:46, Tom Lyon wrote: Thanks, Chris. That did the trick.
Good. Being new to applescript, I opted for the simpler solution by using your first script. It does what I need with just a couple of small tweaks.
Understandable. Regular expressions look like so much Greek to the uninitiated, and you have to install the OSAX (Open Scripting Architecture eXtension). Is there an applescript reference that might list all of the possible interactions applicable to say, Mail, Safari, etc.?
Nope. Sorry about that. :)
There's the Applescript Language Guide for the base Applescript syntax:
But each application has its own Applescript dictionary and few if any are well documented.
You have to learn to read the dictionary in the dictionary window of the Applescript Editor, or Smile (freeware, or Script Debugger (commercial).
Script Debugger offers the most sophisticated means of doing this, but it's also pretty expensive. (I've used it since version 1.0 came out many years ago.)
If you're serious about learning Applescript then you'll want to buy a book or two. The ones I personally recommend at the moment are:
But there are some other good ones.
A really basic Applescript tutorial:
When I started learning Applescript in the early '90s there was only one decent book available (by Danny Goodman). I bought that and lurked on this list for a good while before I started asking lots of questions.
The list has been too quiet lately, so by all means jump in with both feet!
-- Best Regards, Chris
|