email - How to select menus in Mail.app using Apple Script -


what i'm trying set smart mailbox take list of companies mailboxes i'm assigned per day (ranges anywhere between 8 30 depending on size of account , number of people working) can watch , assist companies. ideally script accept list of companies , go through mailboxes , add them smart mailbox "messages in mailbox" "company a" company in mailbox > letter > company. here have far.

set customernames {"example, a"} set customernumber 1 display dialog "what customer's names?" default answer "" set customernames text returned of result tell application "mail" activate tell application "system events"     tell process "mail"         tell menu bar 1             tell menu bar item "mailbox"                 tell menu "mailbox"                     click menu item "new smart mailbox…"                 end tell             end tell         end tell     end tell     keystroke "w" using shift down     keystroke "orklist2"     keystroke tab     keystroke "a"     delay 2     keystroke tab     key code 31 using control down -- down arrow     delay 2     tell process "mail"     name of front mail window     name of selected menu         click menu item "message in mailbox"         keystroke tab         set popupbutton "customernames"         click menu item "add criterion"     end tell   end tell  tell application "system events"     repeat customernames 1 count of customernames         click menu item "add criterion"         set popupbutton menu 13         set customernumber customernames add 1     end repeat     keystroke return end tell 


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -