email - Mail Rules using JavaScript for Automation instead of AppleScript -
i'm trying build mail.app rule (on os x yosemite) using javascript automation instead of applescript, i'm stuck on basics.
i see code in applescript:
using terms application "mail" on perform mail action messages themessages rule therule # actual code here end perform mail action messages end using terms
but i'm unclear how translates javascript.
do define function? set callback? i'm unclear.
i see there performmailactionwithmessages
function, can't figure out how working.
any guidance appreciated!
i figured out:
function performmailactionwithmessages(messages) { messages.foreach( function(message) { // if want iterate }) };
Comments
Post a Comment