Posts Tagged ‘Script’

Script to archive emails into Evernote

Saturday, November 14th, 2009

Applescript 100pxJustin at veritrope has written an applescript that will quickly import emails from mail.app into Evernote , the web-based note and information manager.

It’s easy to use.

First, get the script from veritrope.

Like all Apple Mail-related scripts, the best place to store it is in your ~/Library/Scripts/Applications/Mail folder, so that it appears at the top of the AppleScript menu when mail.app is open.

Then find the email that you want to save into Evernote, highlight it and click the AppleScript menu on the right of your menubar:

Evernotescriptscriptmenu

The script grabs the email and shunts into Evernote. It loads the message first into Evernote’s Desktop app from which it syncs up automatically.

The script also presents a dialogue so that you can tag the email and select where to store it:

Evernotescripttagging

Chosing the “Select notebook from list” options retrieves a list of your existing notebook and also offers you the option to create a new notebook on the fly.

A nice Growl alert lets you know when it’s done.

The end result is a new Evernote note, nicely tagged-up and with a hyperlink back to the original message in mail.app:

Evernotescriptresults

Of course, it all goes much faster if you fire the script with a trigger in Quicksilver or set a keyboard shortcut for it with a utility like Daniel Jalkut’s excellent FastScripts .

veritrope also provides a fistful of applescripts for integrating Evernote with other popular apps like Yojimbo, NeetNewsWire, MacJournal, DEVONThink, even (of all things) Entourage.evernote, mail.app, apple mail, applescript, script, plugins, quicksilver, fastscripts, yojimbo, productivity

Tags: , , , , , , , , ,

Desktop Mail notification with GeekTool

Sunday, March 25th, 2007

GeektoolHannes Bretschneider has written a script that displays notifications about newly arrived mail on the Desktop using the GeekTool utilty.

GeekTool is a Preference Pane utility that can pipe the result of Unix commands, scripts and other things onto the Desktop. There are many ways to use it. For example, Lifehacker journo Gina Trapani uses it to pipe her plain text to-do files onto her Desktop.

Hannes’ script grabs the sender and subject line of new messages. When a GeekTool entry is created for it:

Geektool Prefs

It outputs the results to the Desktop:

Geektoolnotifications

Like all GeekTool outputs, the font face, point size, position on the Desktop and many other options can be set in the GeekTool Preference Pane.

This elegant notification solution runs in the background and avoids the need to use another notification utility.

On the other hand, in order to get the most of out it, you need to be able to see your Desktop. I can’t remember when I last saw mine.mail.app, apple mail, notification, plugin, geektool, script, new mail

Tags: , , , , , ,

Script to send a Yojimbo item with Mail.app

Sunday, January 14th, 2007

YojimboJim Correia of Bare Bones has written an applescript that will send a selected Yojimbo item to someone via Mail.app. (He has also written one for Mailsmith ).

Of course, you can do more of less the same thing by dragging the item onto the Mail.app Dock icon. However, this script can be attached to a Quicksilver trigger (Let Merlin Mann show you how ) or keyboard shortcut (using FastScripts or similar). This seems quicker and more appealing to me.

Scriptemail YojimboTo use it, get the text from the Yojimbo mailing list archive.

Load it into Script Editor, compile it to make sure everything is good and then save it in the Yojimbo folder in your ~/Library/Scripts/Applications folder.

Or create a Yojimbo folder there if one doesn’t exist. That way the script will always be at the top of the AppleScript menu when Yojimbo is the active app.mail.app, apple mail, yojimbo, applescript, quicksilver trigger, fastscripts, productivity, tips, script, email, mailsmith

Tags: , , , , , , , , , ,

A powerful new iCal action for Quicksilver

Tuesday, December 12th, 2006

QuicksilverBenjamin Harley, creator of ABGMerge, the Gmail contacts-Address Book syncing app, has also scripted a powerful iCal action for Quicksilver , which is more flexible and has more options than Quicksilver’s built-in iCal plugin.

It’s complicated (power comes at a cost) but offers a speedy way to quickly enter a complete iCal item on the fly whichever app you are in. I use the current public beta of MailTags to do this when I am in Mail.app, which has the added bonus of automatically creating a URL link back to the email in question. But I’m not always in Mail (sadly).

UPDATE: You can get the latest version of the script here

Download and unzip it, then place it in your ~/Library/Application Support/Quicksilver/Actions folder.

You will need to restart Quicksilver and may need to add the Actions folders to your Quicksilver Catalog (Click the “plus” button and use the “File and Folder Scanner”) so that Quicksilver can find it.

UPDATE: You will also need to edit the script slightly. Open it up in Script editor or the app of your choice and change the property for the default calendar from “Home” to whatever calendar you would like the to-dos and events to be created in.

To use it, type “make ical” into Quicksilver’s first window, select “Process Text…” in the Action window and then type the text to create the to-do or event in the third pane.

For example:

Makeicaltodoqs

This creates a to-do in my Trinity Calendar, specifies a date, adds an alarm and some notes so that I will know where to send the comments on this student’s work, and opens iCal to show me that it was created correctly:

Makeicaltodoical

Events are just as quick and just as clever:

Makeicaleventqs

This creates an event for a meeting tomorrow.

MakeicaleventicalI don’t need to go back to iCal to edit the event; everything I want to add I can add via the Quicksilver action.

The text for this one adds a note about how the meeting might unfold, a location, a date, a starting time, a two hour duration, specifies which calendar to add it to and adds an alarm so that my boss won’t sack me for forgetting to meet with him.

The only downside is that you need to remember the letter for each option.

Benjamin has provided some initial documentation.

The commands can be entered in any order and they are:

t-- [title of to-do]

e-- [title of event] (use t-- or e-- to determine whether the script will create a to-do or an event. The default is a to-do. So if you just type some text (without t--) it will come out as a to-do)

d-- [start date (or due date for to-dos) in m/d/y format (or whatever your system is set to). The default is today for events (in 3 days for to-dos), +n to set that many days from today], [hour in hh:mm format, 24hr clock], [end date in m/d/y format, or +n for number of days if it is an all day event, default is same as start date], [end hour in hh:mm format, +n is number of hours from start date, default is +1], [a for an all-day event].

a-- [set an alarm (default for events is -1 hour, for to-dos 10 am on due date)

n-- [to add to notes section]

l-- [location]

c-- [calendar - default is home]

p-- [priority n,l,m,h (for to-dos only)]

u-- [URL reference]

cb-- [copy contents of clipboard to notes section - will always come after the text in the n-- section]

s-- or show-- [show the event or to-do in iCal after creation so you can check and see if it is right]

Examples

‘do this d-- a-- c--Work cb-- s-- p--h’ will create a to-do with title “do this”, with the clipboard copied to the notes, with a due date in 3 days, an alarm at 10 am and in the calendar named “Work” (if it exists, otherwise in the default which is “Home’), with a high priority and open iCal and show this to-do as soon as it has been created

‘e-- meet someone l--someone’s house n-- the directions a--2 d-- +2 17:00 +2′ will create an event “meet someone” two days from now starting at 5 pm and lasting for 2 hours with an alarm 2 hours before hand with a location “someone’s house” with “the directions” in the notes.

Get a copy of this list here.

[Big hat tip to Benjamin for sharing]quicksilver, ical, action, script, to-dos, events, productivity, on the fly

Tags: , , , , , , ,

Python script to backup an IMAP Account

Thursday, October 5th, 2006

python-logo-glassy.pngIn the hunt for a solid, comprehensive backup solution for his IMAP accounts, Rui Carmo (Tao of Mac) has produced a python script that will copy all the emails from an IMAP account, do it all as safely as possible and generate mbox-formatted files that can be imported into Mail.app and is completely and utterly free.

You can’t ask for more than that!

Not being very smart about these things, I asked him why he didn’t just copy Mail.app’s local caches. He set me straight:

Well, the caches aren’t portable, aren’t in a standardized format, are not guaranteed to be complete (remember the Preferences: you may or may not cache messages, and even then you’re only sure of those you actually downloaded), and they don’t necessarily store the original message contents as they arrived to your server.

Not only that, doing it this way makes the backup useful for people whatever mail client they use.

He hopes to wrap the whole thing in a shiny GUI soon, but for the moment it’s command-line only.

Rui is looking for feedback and testers to help improve the script even more. You can get the script and leave your helpful comments on his web site .

[Thanks to Jacob Rus for the "aquafied" Python image. Check out more nice Mac-friendly icons from Python's future at his web site ]mail.app, apple mail, email, imap, backup, mbox, python, script, tips, local caches

Tags: , , , , , , , , ,

Script to pipe emails into Yojimbo

Monday, September 4th, 2006

YojimboJim Correia of Bare Bones Software has posted a script to the Yojimbo mailing list that will pipe a selected email from Mail.app into Yojimbo.

This is handy (a) if you use Yojimbo and (b) like me, you find it a bit of a pain to import emails with the “Save PDF to Yojimbo” option in the PDF section of the Print dialog.

The script will import the contents of the email and the sender, subject and date into a new Yojimbo note:

Mailtoyojimboscreenie

You can copy the text here:

on generateMessageText(m)
tell application “Mail”
set _sender to sender of m
set _subject to subject of m
set _date to date received of m as string
set _contents to content of m
set _messageString to “From: ” & _sender & return
set _messageString to _messageString & “Subject: ” & _subject & return
set _messageString to _messageString & “Date: ” & _date & return
set _messageString to _messageString & return & return & _contents
end tell
end generateMessageText

on run
tell application “Mail”
tell message viewer 1
set messageList to selected messages
set _name to subject of item 1 of messageList
set _contents to “”
repeat with m in messageList
set _contents to _contents & my generateMessageText(m)
end repeat
tell application “Yojimbo”
make new note item with properties {contents:_contents, name:_name}
end tell
end tell
end tell
end run

Or use this pre-complied version. Save it into the same place as the rest of your mail scripts, maybe give it a keyboard short-cut with FastScripts Lite or set a Quicksilver trigger for it or attach it to a Mail Act-on rule, and you’re done.

Nifty. A big thanks to Jim.yojimbo, mail.app, apple mail, applescript, script, importing messages, productivity, shortcuts

Tags: , , , , , , ,

PHP script to shoehorn IMAP emails into Gmail

Thursday, February 16th, 2006

GmailDrasko Markovic has posted a PHP script on his site that will resend all the email in an IMAP account to your Gmail account.

It can date stamp the emails and the name of the IMAP folder in which the messages are stored can be used as a Gmail label.

I wouldn’t call this a user-friendly solution, but if you have some PHP smarts, have the PHP IMAP module installed and know what you are doing, it might be an easier solution that using Gmail Loader and Thunderbird to move your Mail messages over.

Drasko makes absolutely no guarantees for its use. Neither do I.Gmail, email, importing, IMAP, PHP, script, Gmail loader

Tags: , , , , , ,