I am writing a script to process unread messages in a specific folder in Entourage…
tell application "Microsoft Entourage"
set theFolders to folders
repeat with i in theFolders
if name of i is "FOLDERNAME" then
set theMsgs to (messages of i whose read status is untouched)
exit repeat
end if
end repeat
if (count theMsgs) > 0 then
--do something
end if
end tell
…my problem is that the set theMsgs to (messages of i whose read status is untouched) line is taking too long to process. I’m guessing because the number of read messages in the folder is well over 3000. Is there a faster way to get a list of the unread messages in a folder so I can process them?