Re: Eudora script will not compile
Re: Eudora script will not compile
- Subject: Re: Eudora script will not compile
- From: John Delacour <email@hidden>
- Date: Mon, 24 Feb 2003 09:42:22 +0000
- Mac-eudora-version: 6.0a7
At 11:08 pm -0600 23/2/03, Francine Mack wrote:
tell application "Eudora"
display dialog "The selected messages will be deleted after
twelve hours. There is no undo available." buttons {"Cancel",
"Delete"} default button "Delete"
set btn to button returned of result
if btn is "Delete" then
set theMessages to current messages
repeat with msg in theMessages
delete msg
end repeat
end if
end tell
I am obviously new to scripting. I have tried to rewrite a script
that I found but I was not successful.
The script you found was not written for Eudora.
This script works in two stages -- first it builds a list of selected
messages for any purpose you may have, and then it moves each item in
the list to the trash, which is your present purpose. You can do it
in one stage if you like.
tell application "Eudora"
set mailboxName to the name of the front window
set messageList to {}
(* Get a list of references to selected messages *)
repeat
try
set m to move message "" to the end of mailbox mailboxName
copy m to the end of the messageList
on error
exit repeat
end try
end repeat
(* Move the messages to the Trash mailbox *)
repeat with msg in messageList
move the msg to the end of mailbox "Trash"
end repeat
end tell
JD
_______________________________________________
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.