You can adapt it slightly:
tell application "Microsoft Entourage"
set theMessages to current messages
repeat with i from (count theMessages) to 1 by -1
set theMessage to item i of theMessages
delete theMessage
delete theMessage
end repeat
end tell
It's slower, but will work for you. I'm presuming that you're trying to save
an extra click, so I've omitted the "safety net" dialog and if/then block
provided by Barry . Just put them back in to be safer:
tell application "Microsoft Entourage"
set theMessages to current messages
if theMessages ‚ {} then
display dialog "Do you want to permanently delete the selected
messages?" buttons {"Yes", "No"} default button 2 with icon caution
if button returned of the result is "Yes" then
repeat with i from (count theMessages) to 1 by -1
set theMessage to item i of theMessages
delete theMessage
delete theMessage
end repeat
end if
end if
end tell
--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page:
http://www.entourage.mvps.org/toc.html
Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.
PLEASE always state which version of Entourage you are using - 2001 or X.
It's often impossible to answer your questions otherwise.