Re: Can't compile Mail scripts
Re: Can't compile Mail scripts
- Subject: Re: Can't compile Mail scripts
- From: cricket <email@hidden>
- Date: Mon, 17 Feb 2003 10:53:52 -0800
If you have a Mac OS 9 volume, it could be inadvertently trying to
target a file called 'Mail', which is actually an alias. This has been
an Applescript bug for quite awhile, but I thought it had worked itself
out by now. Deleting that alias should do the trick.
- cricket
On Saturday, February 15, 2003, at 15:35PM, Andrew Oliver wrote:
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.
----->
Software Entomologist Mail for Mac OS X
http://www.apple.com/macosx/jaguar/mail.html
---------->
Thank you and goodbye!
_______________________________________________
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.