Re: Can't compile Mail scripts
Re: Can't compile Mail scripts
- Subject: Re: Can't compile Mail scripts
- From: Andrew Oliver <email@hidden>
- Date: Sat, 15 Feb 2003 15:35:39 -0800
While Mail's dictionary is somewhat more cryptic than I think it should be,
you should get further with your scripts than you seem to.
I'm guessing that you have another application on your disk called "Mail",
and that's what AppleScript is targeting, not the Mail.app that you think it
is.
Try being more specific about the app in question. Either:
tell application "mail.app"
Or even:
tell application "HD:Applications:Mail.app" -- or wherever your Mail.app is
And see if you get any further.
On 2/15/03 2:31 PM, "Stephen Swift" <email@hidden> wrote:
>
Hello,
>
>
I've been trying to write some scripts for Mail, but I keep on getting odd
>
errors when I try to compile my scripts.
>
>
tell application "Mail"
>
activate
>
get every mailbox of account 1
>
--highlights mailbox and the error is "expected class name but found
>
identifier"
>
end tell
>
>
tell application "Mail"
>
make new outgoing message
>
--highlights message and the error is "expected end of line but found
>
identifier"
>
end tell
>
>
tell application "Mail"
>
make new message
>
end tell
>
--compiles fine but thinks message is a variable
>
>
tell application "Mail"
>
make new attachment
>
end tell
>
--compiles fine but thinks attachment is a variable
>
>
I almost think that this is just some fluke on my system, but I'm not sure
>
what would cause it or how to fix it. I just upgraded to 10.2.4 but I
>
hadn't tried writing scripts for Mail before so I don't know if that's the
>
problem. I tried to compile a sample script from Apple but it wouldn't.
>
>
on open these_items
>
tell application "Mail"
>
set the new_message to (make new outgoing message with properties
>
{visible:true})
>
--highlights message and the error is: expected "," but found identifier
>
tell the new_message
>
tell content
>
repeat with i from 1 to the count of these_items
>
set this_file to item i of these_items
>
make new attachment with properties {file name: this_file } at before the
>
first character
>
--highlights : and the error is: expected expression, etc, but found ":"
>
end repeat
>
end tell
>
end tell
>
end tell
>
end open
>
>
Any help will be greatly appreciated. Thanks in advance!
>
>
-Stephen Swift
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.