Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use Mail's scriptability to archive messages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Mail's scriptability to archive messages
Authored by: osxpounder on Jan 06, '05 01:52:55PM

Rich, if your script[s] are putting messages into Mail's mailboxes, or into folders in Finder, I'd love to have that! I'd like to do something similar to what you describe.

---
--
osxpounder



[ Reply to This | # ]
Mailbox locking
Authored by: gshenaut on Jan 06, '05 05:08:12PM

The current hint won't need to deal with locking mailboxes, because it scripts Mail.app itself, but external programs that move messages around among mailboxes will have that problem.

It's easy enough to set up mailboxes & move messages around, but the most painful part is to lock the mailboxes while you are doing it. The best solution I've come up with so far is to applescript a brute-force "quit" before fidding around and a "run" afterwords. Is there a better way to do this?

Greg Shenaut



[ Reply to This | # ]
Mailbox locking
Authored by: kenahoo on Jan 06, '05 08:09:51PM

Yeah, instead of using AppleScript you can use Perl or a shell script, where you have flock() and lockfile, respectively. Those use the system's 'flock' call, which is what programs that manipulate mailbox files do behind the scenes.



[ Reply to This | # ]
Use Mail's scriptability to archive messages
Authored by: richwiss on Jan 07, '05 08:18:13AM

OK, I'll try and get to it today and post it later this afternoon.



[ Reply to This | # ]