![]() |
|
|
|
|
|
|
2
8th September 19:13
External User
Posts: 1
|
Doesn't have one. There are various workarounds/solutions to this, but
since you already know Python the easiest thing would just be to use that. Example: #!/usr/bin/python from appscript import * # from <http://appscript.sourceforge.net> threshold = 2 # your value here mail = app('Mail') subjects = mail.junk_mailbox.messages.subject.get() subjectcount = {} for name in subjects: name = name.lower() if name in subjectcount: subjectcount[name] += 1 else: subjectcount[name] = 1 for name, count in subjectcount.items(): if count > threshold: mail.junk_mailbox.messages[its.subject == name].delete() print 'Deleted %i junk messages named %r' % (count, name) HTH has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org |
|
|
|