| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 2006-09-28, at 11:22:21, Christopher Nebel wrote:
Thanks, That's largely what I was trying to communicate to Yvan in my previous post. then the container is altered -- it no longer contains the number of items it thought it had when it started -- and the container count is compromised. etc. Another thing I noticed with any working variant of this script is that they will fail with an error dialog if no messages are found. Therefore if you'd rather fail gracefully when there is no match, then wrap them in a 'try' block or something like: set sbox to "dumb" set dbox to "date" script mail on MoveMessages(leSource, laDest) tell application "Mail" set mlist to {} tell mailbox leSource set mcount to count of messages repeat with m from 1 to mcount set d to (date received of message m) as date set y to year of d set mon to month of d as integer if (y > 2007 and mon > 1) then set end of mlist to message m end if end repeat end tell if ((count of mlist) > 0) then move mlist to mailbox laDest end tell end MoveMessages end script tell mail to MoveMessages(sbox, dbox) |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden This email sent to email@hidden
| References: | |
| >Re: New to applescript: year of (From: Yvan KOENIG <email@hidden>) | |
| >Fwd: New to applescript: year of (From: Yvan KOENIG <email@hidden>) | |
| >Re: New to applescript: year of (From: Francis Derive <email@hidden>) | |
| >Re: New to applescript: year of (From: Emmanuel <email@hidden>) | |
| >Re: New to applescript: year of (From: Yvan KOENIG <email@hidden>) | |
| >Re: New to applescript: year of (From: Christopher Nebel <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.