Speak a summary of arriving mail messages 1.0
Uses your address book to lookup contact information for emails as they arrive. Then, it speaks a summary. Example: '2 emails just arrived from Alice Smith, and 1 from Joe Thomas, and 3 from unknown senders.' This little bit of information is nice to have so you can decide whether to walk to the computer or not. To install the script: - Place the .scpt file somewhere in your documents. - In Mail.app, open the Mail->Preferences menu, and go to the Rules section. Add a new rule to apply to all incoming messages and choose 'Run AppleScript' as the action to perform.
published on Sunday, the 5. October 2008, scriptbuilders
Trigger Skype video callback via AppleScript
The following Applescript code makes Skype start a call, waits 60 seconds for reply, and when a reply is received, it will start video sending (there's no need for Skyp's auto-send-video option to be on). You can start this script in many ways: Use Mail rules configured to start the script if subject or content matches some rules you decide (the parameters here are fake, do not try this on my email). Go to Mail » Preferences, select Rules, create a new rule, choose the conditions you want to trigger the call, and under 'Perform the following action,' select 'Run AppleScript' and find your saved script. Insert some code in a PHP script -- something like (untested code): <?php $Res=`osascript -e "~/callme.scpt"`; ?>. In this way, a web page/link can start video sending. Instead of PHP, you may call a shell script directly via the web. Schedule a call with iCal. Create an event, and under Alarm, choose "Run script." Use as a ...
published on Friday, the 1. August 2008, macosxhints
Fully automated, one-step sending of a URL from Safari
I often send a link off to one single person, many times a day. You can use the Mail Link to this Page feature in Safari, but that still means you have to compose the email with the To address, and also tell the email to send. Since I do this several times a day, I decided to AppleScript it. Drop the following script into ~/Library » Scripts » Safari; name it what you like. If that folder structure is not already made, just make new folders with the correct names. The script will get the current URL of the frontmost document in Safari. It will not copy it to the clipboard, leaving your clipboard in the same state. The script them brings Mail.app forward, addresses an email, sets a subject, some body copy, and drops the URL into the email. Finally, a signature is added to the message, and it is sent out. After that has happened, Mail.app is set to hidden, and Safari is brought back to the foreground where you last left it. Here's the script: ...
published on Friday, the 22. February 2008, macosxhints
An AppleScript to send an email about a page in Safari
When I find a web page that might be of interest to someone I know, I send an email suggesting they have a look. I want this email to be short and enable the recipient to decide quickly if the page is, in fact, of interest. The email usually includes some text from the page, a link, and a comment from me. But, if you do it often, this recipient-friendly approach becomes labor intensive for the sender. There's too much copying, pasting, and application switching. Hence this Applescript. It puts text you select in Safari into a new Mail message within quotation marks, appends the page link, and puts the page name into the email's subject field. Add a comment, if you wish, and press send. tell application "Safari" activ...
published on Wednesday, the 6. February 2008, macosxhints
Delete stuck outbound messages from Mail
I recently bought my parents a Mac mini, their first Mac. They like it, but unfortunately, only have access to the Internet over dial-up. They will often find that a message gets stuck in the outbox, and rather than wait for it to (eventually) send, they would rather just remove it. You can click on the message and hit the Delete button, but the message count for the outbox doesn't change. If you quit and restart Mail, the messages are still there. What does work is to remove the messages via the shell: rm -f ~/Library/Mail/Mailboxes/Outbox.mbox/Messages/*.emlx I wrote a simple AppleScript program that they can use to accomplish this, after first quitting Mail. It isn't perfect -- when Mail starts again, the Outbox count initially shows a count, but Mail must figure out that the messages no longer exist, because it soon resets the message count in the Outbox. Not perfect, but effective. [robg adds: Note that the above command delete...
published on Friday, the 1. February 2008, macosxhints
Announce incoming Mail message senders
Instead of a simple ding sound, it's possible to have Mail tell you a little more about incoming messages using speech synthesis. Create the following AppleScript in Script Editor: using terms from application "Mail" on perform mail action with messages newMessages repeat with newMessage in newMessages tell application "Mail" set senderName to (extract name from sender of newMessage) say "You've just received an email from " & senderName end tell end repeat end perform mail action with messages end using terms from Save it to something like ~/Library/Scripts/Mail Reader.scpt. In Mail, create a new rule to run the script on every incoming message. [robg adds: You may wish to tweak the settings in the rule to limit announcements of things like mailing list messages and spam...]
published on Tuesday, the 29. January 2008, macosxhints
An AppleScript to send from NetNewsWire 3.1.1 to Tumblr
Here's an Applescript that sends the currently selected headline from NetNewsWire 3.1.1 to Tumblr. It does little error checking, and requires the user to create a new keychain key for http://www.tumblr.net, as there is some issue with the .com domain that I haven't figured out yet. tell application "NetNewsWire" set NNWURL to (URL of selectedHeadline) set NNWTitle to (title of selectedHeadline) set NNWSummary to (paragraph 1 of (get description of selectedHeadline & "?")) end tell tell application "Keychain Scripting" set tumblr_key to first Internet key of current keychain whose server is "www.tumblr.net" set tumblr_login to ("email=" & account of tumblr_key & "&...
published on Tuesday, the 29. January 2008, macosxhints
Send multiple SMS and MMS via Mail or iPhone Mail
Using Teleflip (a free service with sign-up; Wikipedia entry), you can send SMS and MMS messages via any email client. This blog post contains AppleScript code that will parse mobile numbers in your Address Book, and add them as email addresses in a 1234567890@teleflip.com format. Using the script, you can send SMS and MMS messages to multiple contacts from your Mac or iPhone's Mail with ease. If you don't wish to use Teleflip, and you know the carriers for your contacts, then you can use these email address suffixes: Alltel: 1234567890@message.alltel.com AT&T: 1234567890@mms.att.net Boost Mobile: 1234567890@myboostmobile.com Cingular (AT&T): 1234567890@mms.mycingular.com Einstein PCS: 1234567890@einsteinmms.com Sprint: 1234567890...
published on Wednesday, the 12. December 2007, macosxhints
Create a web-accessible Dashboard screen capture
One of the great new features of Safari in Leopard is the ability to create Dashboard widgets from any website. I've used it quite a bit to create widgets for sites that I check regularly. And with a little help from AppleScript and iCal, you can create a snapshot of your web-clip-loaded Dashboard for a website, or to send via email. Note that this hint does not require 10.5, as it's simply taking a screenshot of the Dashboard. First, I created a very quick and simple AppleScript to open Dashboard, take the picture, and close the Dashboard: display dialog "The SCREENCAPTURE program is about to run. Please push cancel to end screencapture." giving up after 10 tell application "System Events" key code 111 #key code...
published on Monday, the 10. December 2007, macosxhints
PageSender 4.1 adds Leopard, speed
SmileOnMyMac has released an upgrade to PageSender, its Mac-based fax application. Users can send faxes and PDF e-mails directly from the Print dialog, and receive them through a fax modem; these can then be printed, e-mailed, or integrated into AppleScript. Filters sort spam by station name, and live addressing is possible with clients such as A...
published on Tuesday, the 23. October 2007, macintosh-news-network