Q : I have tons of mailbox folder in Mail , some of them nested several levels deep . Over the old age I ’ve charge thousands of messages in them , some of which I never marked as read . Is there a way to go through all those booklet and mark all of the messages as read ?
Absolutely . You want to assure Mail to correct the read status attribute of every unread message in your Inbox , local mailboxes , and mailboxes on your mail waiter tofalse . Be inclined , though : count on the number of subject matter and mailbox you have , this routine may take a while to melt . And since individual AppleScript commands time out if they do n’t finish within 2 minutes , you might also get an error . That ’s why it ’s a good idea to enclose your book in atimeout wrapperto foreclose such errors . The script below allow each action up to 5 minutes to finish ; palpate free to increase the timeout flow if necessary .
Q : For archiving rationality at work , I ’ve been asked to impress thousands of Mail email messages to PDF data formatting . How can I automate that ?
Unfortunately , Mail does n’t have built - in AppleScript support for saving a message as a PDF , so the root is n’t as dewy-eyed as it might seem . But it ’s definitely possible . The trick is to use some UI scripting to crop around the limitation . First , go to the Accessibility system preference , and ensure theEnable access for assistive devicescheckbox is choose ; UI scripting does n’t work unless this setting is turned on .
This script saves the frontmost open message as a PDF . To process multiple messages , you may expand the hand by wrapping it in a repeat loop and adding some erroneousness shelter . ( Here ’s a scriptthat saves all inbox messages as PDFs . )
Keep in mind that this script is tied to Mail ’s interface , and that it expects sure menus , buttons , and windows to live . If Apple moves things around in a next version of OS X , you might want to make some adjustments to the script .
Q : When I ’m at the office , I connect my MacBook Air to an outside monitor , which I then use as my primary screen ; the Air ’s CRT screen is mainly for my Calendar and Mail . I ’d love to have a book that I can unravel when I get at piece of work that would automatically move these covering window to the Air ’s concealment and resize them . Can it be done ?
get ’s say the first book return the values{-1426 , 102 , -491 , 930 } , while the second returns– > { -955 , 100 , -7 , 845 } . Plug those numbers into the script below . When you lean the script , it will resize and dislodge the window consequently . Save the handwriting as an lotion , and drag it to your Dock . Whenever you ’re in the office , just clack it to readjust the windows . You might require to debate writing a 2nd version of the script to shift them when you ’re using the MacBook ’s projection screen alone .
Have a trouble that the Script Doctor might help with ? Send them to scriptdoctor@macworld.com .
Updated 10/29/12 4:45 p.m. PT to correct redaction erroneousness in question re : publish to PDFs .