Help; script doesn't work
Help; script doesn't work
- Subject: Help; script doesn't work
- From: Michelle Steiner <email@hidden>
- Date: Thu, 1 Apr 2004 10:21:37 -0700
In the final try of the Vacation Mail script, I found that it does not
work. Here is the script again, followed by the discussion of what
happens or doesn't happen.
tell application "Mail"
-- set the messages_to_process to the selection --(A)
perform mail action with messages messages_to_process for rule
"vacation" --(B)
repeat with message_to_process in messages_to_process
if junk mail status of message_to_process is false then
set the_sender to the sender of the message_to_process
my add_to_vacation(extract address from the_sender)
set the_reply_message to reply the message_to_process
set the content of the_reply_message to ,
"I'm on vacation; I'll get back to you after I get home."
send the_reply_message
end if
end repeat
end tell
to add_to_vacation(email_sender)
tell application "Address Book"
set the newbie to make new person at after the people of group
"Vacation"
make new email at after the emails of the newbie with properties
{label:"Vacation", value:email_sender}
save addressbook
end tell
end add_to_vacation
If the line (A) is uncommented and line (B) is commented, and the
script run from script editor, it works perfectly.
If it is called by the mail action, and run as above, the script is
called, but does nothing. A test line (e.g., display dialog) right
before the "perform mail action" line executes, but a test line
immediately after it does not execute. No errors are generated (at
least none that I can detect).
-- Michelle
--
Peter pull at St. Taffy's tonight! (Or is it the other way around?)
_______________________________________________
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.