I've learned from this document:
http://developer.apple.com/techpubs/macosx/Carbon/pdf/AppleScriptLanguageGuide.pdf
Also, you can figure out a lot by simply looking at the Dictionaries of various applications. Open the Script Editor app and select Open Dictionary from the File menu, then pick the app you want to script.
I've never tried an Applescript book. It might be a good buy. There are a lot of ins and outs to the language and we know for a fact it can be tricky. A book might ease the learning curve and make it more useable. For a Unix script kiddy like me, I can often get away with not using Applescript, but there are a lot of things Applescript can do, so its probably a good investment.
Also, are you familiar with 'cron'? Its the built-in Unix schedular. It runs automatically on a default Mac OS X install.
You can use the crontab command on the command line to edit the scheduled commands.
Do a:
To edit the scheduled commands.
Beware! It will use vi to edit the file. Figure out how to use vi before trying to edit the file
The items to be scheduled take the following form (one item to be scheduled per line):
Code:
minute hour DayOfMonth Month DayOfWeek CommandToRun
You can specify any of the time fields with a * to indicate any value is acceptable. An example entry might look like this:
Code:
5 4 * * sun echo "run at 5 after 4 every sunday"
Here, the command to run is echo with some parameters. You could substitute that with the location of an AppleScript or command line utility. There may also be front end utilities to control cron and make it more useable for the casual user.
Taft