G’day Fred
This question has plagued me for 10 years. The only reliable method I’ve found is to ultimately Quit and re-start Mail, which forces a clearance.
In the meantime, what my method is is…
1. Make two mailboxes, ‘* items to shift’, ‘*items to store’.
2. Make a mail rule for your inbox that shifts ALL incoming mail to mailbox ‘* items to shift’.
3. Your script, when starting, shifts all the mail in ‘* items to shift’ to ‘* items' to store, and counts it when finished.
4. When you deal with a mail item from ‘* items to store’, move the treated mail, and in a loop, keep counting the mail in ‘* items to store’.
5. If after a set time, the count does not diminish by 1, then quit and re-start Mail.
6. Re-count the mail in ‘* items to store’.
7. Once the count reaches zero, move any new mail from ‘* items to shift’ to ‘* items to store’.
8. Re-do the cycle if count is not zero, otherwise periodically re-check for new mail, and shift it, and re-cycle.
Hope this helps.
Regards
Santa
On 26 May 2015, at 4:33 am, Fred Diepeveen < email@hidden> wrote: Hi, maybe some can help on this issue:
- My script counts and selects mail in a specific mailbox "notfound"
- It counts 2 mail messages through set lastMessage to (get count of messages of mailbox "INBOX" of account notfoundaccount)
- Some work is done
- Messages are moved to a folder trough move theMessage to mailbox "SweepDone" of account notfoundaccount -- a folder contained by another folder
- All's working well but then:
- Running the same script again, it finds 2 messages with are in the sweepDone folder. Inbox is empty.
- QUESTION: how can I stop mail and applescript finding messages in the "inbox" of the account? The messages are moved to the folder sweepDone. I even tried to move the messages to an other account but mail is still finding the messages
Q Que Thanks and regards .
Fred Diepeveen +31 652002500
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
|