For a while I just tried sorting and deleting the rest, but that was just annoying.
Applescript to the rescue: I wrote the following script, which works just fine. But it’s darned slow.
tell application "Microsoft Entourage"
set StartTime to the current date
set currMsg to the current messages as list
set MsgCount to count of currMsg
set NoFlagMsg to {} as list
say (MsgCount as text) & " items to check"
repeat with eachMsg in currMsg
if flagged of eachMsg is false then
copy eachMsg to the end of NoFlagMsg
end if
end repeat
repeat with eachItem in NoFlagMsg
delete eachItem
set MsgCount to MsgCount - 1
if (MsgCount mod 25 = 0) and (MsgCount > 0) then
say (MsgCount as text) & " to go."
end if
end repeat
set ElapsedTime to (current date) - StartTime
say "Elapsed time: " & ((ElapsedTime div 60) as text) & " minutes " & ((ElapsedTime mod 60) as text) & " seconds."
end tell
What I really want is this:
delete every item in NoFlagMsg
which responds that every item doesn’t understand the command. What’s the right syntax to do this in one fell swoop?
Best,
Jeff Porten
