• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applescript counting mails keeps counting mail in other folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript counting mails keeps counting mail in other folders


  • Subject: Re: Applescript counting mails keeps counting mail in other folders
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 26 May 2015 20:14:32 +1000

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:

  1. My script counts and selects mail in a specific mailbox "notfound"
  2. It counts 2 mail messages through  set lastMessage to (get count of messages of mailbox "INBOX" of account notfoundaccount)
  3. Some work is done 
  4. Messages are moved to a folder trough move theMessage to mailbox "SweepDone" of account notfoundaccount -- a folder contained by another folder
  5. All's working well but then:
  6. Running the same script again, it finds 2 messages with are in the sweepDone folder. Inbox is empty. 
  7. 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
email@hidden
+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
References: 
 >Applescript counting mails keeps counting mail in other folders (From: Fred Diepeveen <email@hidden>)

  • Prev by Date: Re: 'Make new attachment' dilemma
  • Next by Date: Re: 'Make new attachment' dilemma
  • Previous by thread: Applescript counting mails keeps counting mail in other folders
  • Next by thread: Re: Applescript counting mails keeps counting mail in other folders
  • Index(es):
    • Date
    • Thread