Re: Looking for documentation to fill in the blanks...
Re: Looking for documentation to fill in the blanks...
- Subject: Re: Looking for documentation to fill in the blanks...
- From: Christopher Nebel <email@hidden>
- Date: Sun, 10 Feb 2008 09:55:11 -0800
On Feb 7, 2008, at 3:42 PM, Malcolm Fitzgerald wrote:
On 08/02/2008, at 9:36 AM, Stephen Jones wrote:
I am new to Applescript. I was hoping I could create a simple
application which would process incoming mail to a specific mailbox
and extract data from the body of the mail. The mail messages are
formatted. This process is currently implemented in an Exchange/
SQL environment but I want to move it to Mac OS X Mail and Filemaker.
I have downloaded all the Applescript documentation I can find, but
I am baffled by the Script dictionary for Mail.
I have two basic questions:
a) The dictionary provides nothing in the way of usage - there are
no examples. Where do I find documentation which explains how the
dictionary parameters are actually used in a script?
Look in the Applescript folder (in Applications) for the applescript
utiility. Use it add the script menu to your menus and to include
the library scripts. There are a few examples for Mail in there.
Alternatively, just look in /Applications/AppleScript/Example
Scripts. It's actually the same stuff that Script Menu uses.
c) Usage, general. I created a simple script just to get
started. It does not work however - but then I am guessing as to
how to do this:
set mailbox to "special"
tell application "Mail"
set NewMessages to unread count of mailbox
display dialog NewMessages
end tell
Close. Two mistakes. ...
Mr. Fitzgerald's answer was correct, but you're probably going to hit
another problem like that within five minutes.
The choice of the term "dictionary" for an application's scripting
interface is not accidental. Trying to learn AppleScript as a whole
by reading an application's dictionary works about as well as trying
to learn English by reading a regular dictionary. In other words, it
will tell you what any particular word means, but nothing about
grammar and how to put the words together. There's a certain amount
of knowledge presumed, such as how to specify an object, which it
looks like you don't understand yet.
In theory, you can learn this base knowledge by reading the
AppleScript Language Guide, but because it's structured as a reference
and not a tutorial, it doesn't work well for some people. In that
case, there are a number of third party books that may serve you
better -- search Amazon for "AppleScript" for a list.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden