Can't compile Mail scripts
Can't compile Mail scripts
- Subject: Can't compile Mail scripts
- From: Stephen Swift <email@hidden>
- Date: Sat, 15 Feb 2003 17:31:01 -0500
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.