View Single Post

so im a little stuck with this script now.

i can get all the flagged mails from my account using the code below and send the flagged mail to omnifoucs:

PHP Code:
set thisAccount to exchange account "MYEXCHANGEACCOUNT"
set thisFolders to mail folder of thisAccount
    repeat with theFolder in thisFolders
if name of theFolder is "Inbox" then
            set selectedMessages to messages of theFolder
            repeat with theMessages in selectedMessages
if ((todo flag of theMessagesis not completedthen
--Send to OmniFoucs

end repeat
end repeat 
But its slow!

in the script i referenced you can do the following with the mail app:

PHP Code:
set _msgs_to_capture to (a reference to 
(every message of _inbox 
                    whose flagged status is true
Is this type of command available in outlook?
i can't get it to work

Is there a faster way to query the the database just to return the flagged emails?

Smart Folders have flagged mail in them, they return (within outlook) in a second. Does anyone know how i can access them?

Either via outlook apple script, or system events?

I've got the script to catch flagged new mail when they arrive via rules, however if the mail is already read then it will not catch it.