<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Entourage to Evernote Applescript</title>
	<atom:link href="http://veritrope.com/tips/entourage-to-evernote/feed" rel="self" type="application/rss+xml" />
	<link>http://veritrope.com/tips/entourage-to-evernote</link>
	<description>Technology of Art \/ Art of Technology</description>
	<lastBuildDate>Tue, 09 Mar 2010 03:42:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Justin</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-643</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Wed, 18 Nov 2009 16:41:36 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-643</guid>
		<description>&lt;strong&gt;To be very clear about what this is for people just joining the thread (and for those new to AppleScript):&lt;/strong&gt;
&lt;ul&gt;
	&lt;li&gt;Pete&#039;s modified code will create one note for the email message body and and additional note for each attachment to that email. You can then manually merge these items into a single note if you&#039;d like&lt;/li&gt;

	&lt;li&gt;Pete&#039;s modification to the script will remove certain typography from your note body in order to avoid a specific type of error. If keeping the typographical symbols inside your notes unchanged is important to you, you shouldn&#039;t use this code.&lt;/li&gt;
&lt;/ul&gt;



Thanks for your hard work and for posting this, Pete!
</description>
		<content:encoded><![CDATA[<p><strong>To be very clear about what this is for people just joining the thread (and for those new to AppleScript):</strong></p>
<ul>
<li>Pete&#8217;s modified code will create one note for the email message body and and additional note for each attachment to that email. You can then manually merge these items into a single note if you&#8217;d like</li>
<li>Pete&#8217;s modification to the script will remove certain typography from your note body in order to avoid a specific type of error. If keeping the typographical symbols inside your notes unchanged is important to you, you shouldn&#8217;t use this code.</li>
</ul>
<p>Thanks for your hard work and for posting this, Pete!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-641</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Wed, 18 Nov 2009 13:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-641</guid>
		<description>Upps wrong copy/paste. ;-)

&lt;code&gt;
set myContent to do shell script &quot;echo &quot; &amp; quoted form of myContent &amp; &quot; &#124; sed -E &#039;s/(\\&lt;[^)/\\1\\2/g&#039;&quot;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Upps wrong copy/paste. <img src='http://veritrope.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">set myContent to do shell script &quot;echo &quot; &amp;amp; quoted form of myContent &amp;amp; &quot; | sed -E 's/(\\&amp;lt;[^)/\\1\\2/g'&quot;</div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-640</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Wed, 18 Nov 2009 13:15:08 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-640</guid>
		<description>Ar more conservative version would be

&lt;code&gt;
set myContent to do shell script &quot;echo &quot; &amp; quoted form of myContent &amp; &quot; &#124; sed &#039;s/\\&lt;[^&lt;]*\\/\\&gt;//g&#039;&quot;
&lt;/code&gt;

just stripping the / from the closing /&gt; tag</description>
		<content:encoded><![CDATA[<p>Ar more conservative version would be</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">set myContent to do shell script &quot;echo &quot; &amp; quoted form of myContent &amp; &quot; | sed 's/\\&lt;[^&lt;]*\\/\\&gt;//g'&quot;</div></td></tr></tbody></table></div>
<p>just stripping the / from the closing /&gt; tag</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-639</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Wed, 18 Nov 2009 12:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-639</guid>
		<description>Hi Justin,

it is not ideal to mess with body of a note, but the following modification of your script gets rid of the error message:

&lt;code&gt;
repeat with thisMessage in theMessages
    set myTitle to the subject of thisMessage
    set myContent to the content of thisMessage
    set myContent to do shell script &quot;echo &quot; &amp; quoted form of myContent &amp; &quot; &#124; sed &#039;s/\\&lt;[^&lt;]*\\/\\&gt;//g&#039;&quot;
&lt;/code&gt;

At least a workaround until Evernote improves their text parser.

Below the changes incorporated into my initial mods of your script for the lazy people. ;-)

Have fun.

Pete

&lt;code&gt;
(*
http://veritrope.com
Entourage to Evernote
Version 1.1
Nov 17, 2009

Modified by Peter Gutbrod to add clipping of email attachments.

Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/tips/entourage-to-evernote
    
    Some choices inspired by the following scripts/authors:
    -- Mike Hall (http://mph.puddingbowl.org/)
    -- Ernie Soffronoff
    -- Daniel N. Byler&#039;s DEVONthink script
    -- NetNewsWire To Pukka and Yojimbo
    -- Jan Erik Mostrom&#039;s script
    -- David Nunez scripts
    -- MANY, MANY OTHERS!
            
Installation:  A few options....

-- You can highlight the email messages you want to archive into Evernote and double-click this script file;
-- You can save this script to ~/Documents/Microsoft User Data folder or simply drag the script into the Entourage Script Menu Items folder and it is immediately available for use.
-- Keyboard shortcuts can also be assigned to AppleScripts in the script menu using the System Preferences &quot;Keyboard &amp; Mouse Settings&quot;.

FastScripts Installation (Optional, but recommended): 
-- Download and Install FastScripts from http://www.red-sweater.com/fastscripts/index.html
-- Save this script to ~/Library/Scripts/Applications/Microsoft Entourage
-- Set up your keyboard shortcut in FastScripts Preferences
*)

property successCount : 0
property MailTitle : &quot;&quot;
property EVTag : &quot;&quot;
property myTitle : &quot;&quot;

(* CHECK FOR GROWL *)
tell application &quot;System Events&quot;
    set processnames to name of every process
end tell
if &quot;GrowlHelperApp&quot; is in processnames then
    tell application &quot;GrowlHelperApp&quot;
        set the allNotificationsList to {&quot;Success Notification&quot;, &quot;Failure Notification&quot;}
        set the enabledNotificationsList to {&quot;Success Notification&quot;, &quot;Failure Notification&quot;}
        register as application ¬
            &quot;Entourage to Evernote&quot; all notifications allNotificationsList ¬
            default notifications enabledNotificationsList ¬
            icon of application &quot;Evernote&quot;
    end tell
end if

tell application &quot;Finder&quot;
    set TmpFolder to ((folder &quot;tmp&quot; of home) as text)
end tell

(*MAIN PROGRAM *)
tell application &quot;Microsoft Entourage&quot;
    try
        if (selection is not 0) then
            set defaultTag to &quot;Email Message&quot;
            set userInput to ¬
                text returned of ¬
                (display dialog &quot;Enter Tags, separated by colons or commas:&quot; &amp; return &amp; return &amp; ¬
                    &quot;NOTE: Default Tag is &#039;Email Message&#039;&quot; default answer defaultTag)
            set theDelims to {&quot;:&quot;, &quot;,&quot;}
            set EVTag to my Tag_List(userInput, theDelims)
            set theMessages to current messages
            set EVnotebook to my Notebook_List()
            repeat with thisMessage in theMessages
                set myTitle to the subject of thisMessage
                set myContent to the content of thisMessage
                set myContent to do shell script &quot;echo &quot; &amp; quoted form of myContent &amp; &quot; &#124; sed &#039;s/\\&lt;[^&lt;]*\\/\\&gt;//g&#039;&quot;
                set ReplyAddr to the sender&#039;s address of thisMessage
                set EmailDate to the time received of thisMessage
                set myText to &quot;Message from mailto:&quot; &amp; ReplyAddr &amp; &quot; on &quot; &amp; EmailDate &amp; &quot;:&quot; &amp; return &amp; return &amp; myContent
                
                tell application &quot;Evernote&quot;
                    set n to create note with text myText ¬
                        title myTitle ¬
                        notebook ¬
                        EVnotebook tags EVTag
                    set creation date of n to EmailDate
                    set source URL of n to ReplyAddr
                end tell
                
                set theAttachments to the attachments of thisMessage
                repeat with thisAttachment in theAttachments
                    set theName to name of thisAttachment
                    set FilePath to TmpFolder &amp; theName
                    save thisAttachment in FilePath
                    
                    tell application &quot;Evernote&quot;
                        set n to create note from file FilePath ¬
                            notebook EVnotebook tags EVTag
                        set creation date of n to EmailDate
                        set source URL of n to ReplyAddr
                    end tell
                    tell application &quot;Finder&quot;
                        delete file FilePath
                    end tell
                end repeat
                set successCount to successCount + 1
            end repeat
            
            if &quot;GrowlHelperApp&quot; is in processnames then
                tell application &quot;GrowlHelperApp&quot; -- GROWL SUCCESS
                    notify with name ¬
                        &quot;Success Notification&quot; title ¬
                        &quot;Import Success&quot; description &quot;Successfully Exported &quot; &amp; successCount &amp; ¬
                        &quot; Messages to Evernote!&quot; application name &quot;Entourage to Evernote&quot;
                end tell
                set successCount to 0
            end if
            
        else if &quot;GrowlHelperApp&quot; is in processnames then
            tell application &quot;GrowlHelperApp&quot; -- GROWL FAILURE FOR NO SELECTION
                notify with name ¬
                    &quot;Failure Notification&quot; title ¬
                    &quot;Import Failure&quot; description ¬
                    &quot;No headline or tab selected!&quot; application name &quot;Entourage to Evernote&quot;
            end tell
            
        else if &quot;GrowlHelperApp&quot; is not in processnames then -- NON-GROWL ERROR MSG. FOR NO SELECTION
            display dialog &quot;No headline or tab selected!&quot; with icon 0
        end if
        
        (* ERROR HANDLING *)
    on error errText number errNum
        if &quot;GrowlHelperApp&quot; is in processnames then
            tell application &quot;GrowlHelperApp&quot; -- GROWL FAILURE FOR ERROR
                notify with name ¬
                    &quot;Failure Notification&quot; title ¬
                    &quot;Import Failure&quot; description &quot;Failed to export &quot; &amp; return &amp; myTitle &amp; ¬
                    &quot;\&quot;  due to the following error: &quot; &amp; return &amp; errText ¬
                    application name &quot;Entourage to Evernote&quot;
            end tell
        else if &quot;GrowlHelperApp&quot; is not in processnames then -- NON-GROWL ERROR MSG. FOR ERROR
            display dialog &quot;Item Failed to Import: &quot; &amp; errNum &amp; return &amp; errText with icon 0
        end if
    end try
end tell

(* SUBROUTINES *)
--TAG SELECTION SUBROUTINE
on Tag_List(userInput, theDelims)
    set oldDelims to AppleScript&#039;s text item delimiters
    set theList to {userInput}
    repeat with aDelim in theDelims
        set AppleScript&#039;s text item delimiters to aDelim
        set newList to {}
        repeat with anItem in theList
            set newList to newList &amp; text items of anItem
        end repeat
        set theList to newList
    end repeat
    return theList
    set AppleScript&#039;s text item delimiters to oldDelims
end Tag_List

--EVERNOTE NOTEBOOK SELECTION SUBROUTINE 
on Notebook_List()
    tell application &quot;Evernote&quot;
        activate
        set listOfNotebooks to {} (*PREPARE TO GET EVERNOTE&#039;S LIST OF NOTEBOOKS *)
        
        (*GET THE NOTEBOOK LIST *)
        set EVNotebooks to every notebook
        repeat with currentNotebook in EVNotebooks
            set currentNotebookName to (the name of currentNotebook)
            copy currentNotebookName to the end of listOfNotebooks
        end repeat
        
        (*SORT THE LIST *)
        set Folders_sorted to my simple_sort(listOfNotebooks)
        
        (*USER SELECTION FROM NOTEBOOK LIST *)
        set SelNotebook to choose from list of Folders_sorted with title &quot;Select Evernote Notebook&quot; with prompt ¬
            &quot;Current Evernote Notebooks&quot; OK button name &quot;OK&quot; cancel button name &quot;New Notebook&quot;
        
        if (SelNotebook is false) then (*CREATE NEW NOTEBOOK OPTION *)
            set userInput to ¬
                text returned of (display dialog &quot;Enter New Notebook Name:&quot; default answer &quot;&quot;)
            set EVnotebook to userInput
        else
            set EVnotebook to item 1 of SelNotebook
        end if
        
    end tell
end Notebook_List

--SORT SUBROUTINE
on simple_sort(my_list)
    set the index_list to {}
    set the sorted_list to {}
    repeat (the number of items in my_list) times
        set the low_item to &quot;&quot;
        repeat with i from 1 to (number of items in my_list)
            if i is not in the index_list then
                set this_item to item i of my_list as text
                if the low_item is &quot;&quot; then
                    set the low_item to this_item
                    set the low_item_index to i
                else if this_item comes before the low_item then
                    set the low_item to this_item
                    set the low_item_index to i
                end if
            end if
        end repeat
        set the end of sorted_list to the low_item
        set the end of the index_list to the low_item_index
    end repeat
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi Justin,</p>
<p>it is not ideal to mess with body of a note, but the following modification of your script gets rid of the error message:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">repeat with thisMessage in theMessages<br />
&nbsp; &nbsp; set myTitle to the subject of thisMessage<br />
&nbsp; &nbsp; set myContent to the content of thisMessage<br />
&nbsp; &nbsp; set myContent to do shell script &quot;echo &quot; &amp; quoted form of myContent &amp; &quot; | sed 's/\\&lt;[^&lt;]*\\/\\&gt;//g'&quot;</div></td></tr></tbody></table></div>
<p>At least a workaround until Evernote improves their text parser.</p>
<p>Below the changes incorporated into my initial mods of your script for the lazy people. <img src='http://veritrope.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Have fun.</p>
<p>Pete</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br />115<br />116<br />117<br />118<br />119<br />120<br />121<br />122<br />123<br />124<br />125<br />126<br />127<br />128<br />129<br />130<br />131<br />132<br />133<br />134<br />135<br />136<br />137<br />138<br />139<br />140<br />141<br />142<br />143<br />144<br />145<br />146<br />147<br />148<br />149<br />150<br />151<br />152<br />153<br />154<br />155<br />156<br />157<br />158<br />159<br />160<br />161<br />162<br />163<br />164<br />165<br />166<br />167<br />168<br />169<br />170<br />171<br />172<br />173<br />174<br />175<br />176<br />177<br />178<br />179<br />180<br />181<br />182<br />183<br />184<br />185<br />186<br />187<br />188<br />189<br />190<br />191<br />192<br />193<br />194<br />195<br />196<br />197<br />198<br />199<br />200<br />201<br />202<br />203<br />204<br />205<br />206<br />207<br />208<br />209<br />210<br />211<br />212<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">(*<br />
http://veritrope.com<br />
Entourage to Evernote<br />
Version 1.1<br />
Nov 17, 2009<br />
<br />
Modified by Peter Gutbrod to add clipping of email attachments.<br />
<br />
Project Status, Latest Updates, and Comments Collected at:<br />
http://veritrope.com/tips/entourage-to-evernote<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Some choices inspired by the following scripts/authors:<br />
&nbsp; &nbsp; -- Mike Hall (http://mph.puddingbowl.org/)<br />
&nbsp; &nbsp; -- Ernie Soffronoff<br />
&nbsp; &nbsp; -- Daniel N. Byler's DEVONthink script<br />
&nbsp; &nbsp; -- NetNewsWire To Pukka and Yojimbo<br />
&nbsp; &nbsp; -- Jan Erik Mostrom's script<br />
&nbsp; &nbsp; -- David Nunez scripts<br />
&nbsp; &nbsp; -- MANY, MANY OTHERS!<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
Installation: &nbsp;A few options....<br />
<br />
-- You can highlight the email messages you want to archive into Evernote and double-click this script file;<br />
-- You can save this script to ~/Documents/Microsoft User Data folder or simply drag the script into the Entourage Script Menu Items folder and it is immediately available for use.<br />
-- Keyboard shortcuts can also be assigned to AppleScripts in the script menu using the System Preferences &quot;Keyboard &amp;amp; Mouse Settings&quot;.<br />
<br />
FastScripts Installation (Optional, but recommended): <br />
-- Download and Install FastScripts from http://www.red-sweater.com/fastscripts/index.html<br />
-- Save this script to ~/Library/Scripts/Applications/Microsoft Entourage<br />
-- Set up your keyboard shortcut in FastScripts Preferences<br />
*)<br />
<br />
property successCount : 0<br />
property MailTitle : &quot;&quot;<br />
property EVTag : &quot;&quot;<br />
property myTitle : &quot;&quot;<br />
<br />
(* CHECK FOR GROWL *)<br />
tell application &quot;System Events&quot;<br />
&nbsp; &nbsp; set processnames to name of every process<br />
end tell<br />
if &quot;GrowlHelperApp&quot; is in processnames then<br />
&nbsp; &nbsp; tell application &quot;GrowlHelperApp&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the allNotificationsList to {&quot;Success Notification&quot;, &quot;Failure Notification&quot;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the enabledNotificationsList to {&quot;Success Notification&quot;, &quot;Failure Notification&quot;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; register as application ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Entourage to Evernote&quot; all notifications allNotificationsList ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default notifications enabledNotificationsList ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; icon of application &quot;Evernote&quot;<br />
&nbsp; &nbsp; end tell<br />
end if<br />
<br />
tell application &quot;Finder&quot;<br />
&nbsp; &nbsp; set TmpFolder to ((folder &quot;tmp&quot; of home) as text)<br />
end tell<br />
<br />
(*MAIN PROGRAM *)<br />
tell application &quot;Microsoft Entourage&quot;<br />
&nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (selection is not 0) then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set defaultTag to &quot;Email Message&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set userInput to ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text returned of ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (display dialog &quot;Enter Tags, separated by colons or commas:&quot; &amp;amp; return &amp;amp; return &amp;amp; ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;NOTE: Default Tag is 'Email Message'&quot; default answer defaultTag)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set theDelims to {&quot;:&quot;, &quot;,&quot;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EVTag to my Tag_List(userInput, theDelims)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set theMessages to current messages<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EVnotebook to my Notebook_List()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repeat with thisMessage in theMessages<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set myTitle to the subject of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set myContent to the content of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set myContent to do shell script &quot;echo &quot; &amp; quoted form of myContent &amp; &quot; | sed 's/\\&lt;[^&lt;]*\\/\\&gt;//g'&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set ReplyAddr to the sender's address of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EmailDate to the time received of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set myText to &quot;Message from mailto:&quot; &amp;amp; ReplyAddr &amp;amp; &quot; on &quot; &amp;amp; EmailDate &amp;amp; &quot;:&quot; &amp;amp; return &amp;amp; return &amp;amp; myContent<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set n to create note with text myText ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title myTitle ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notebook ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EVnotebook tags EVTag<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set creation date of n to EmailDate<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set source URL of n to ReplyAddr<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set theAttachments to the attachments of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repeat with thisAttachment in theAttachments<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set theName to name of thisAttachment<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set FilePath to TmpFolder &amp;amp; theName<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; save thisAttachment in FilePath<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set n to create note from file FilePath ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notebook EVnotebook tags EVTag<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set creation date of n to EmailDate<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set source URL of n to ReplyAddr<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;Finder&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delete file FilePath<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set successCount to successCount + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if &quot;GrowlHelperApp&quot; is in processnames then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;GrowlHelperApp&quot; -- GROWL SUCCESS<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notify with name ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Success Notification&quot; title ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Import Success&quot; description &quot;Successfully Exported &quot; &amp;amp; successCount &amp;amp; ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot; Messages to Evernote!&quot; application name &quot;Entourage to Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set successCount to 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; else if &quot;GrowlHelperApp&quot; is in processnames then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;GrowlHelperApp&quot; -- GROWL FAILURE FOR NO SELECTION<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notify with name ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Failure Notification&quot; title ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Import Failure&quot; description ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;No headline or tab selected!&quot; application name &quot;Entourage to Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; else if &quot;GrowlHelperApp&quot; is not in processnames then -- NON-GROWL ERROR MSG. FOR NO SELECTION<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display dialog &quot;No headline or tab selected!&quot; with icon 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; (* ERROR HANDLING *)<br />
&nbsp; &nbsp; on error errText number errNum<br />
&nbsp; &nbsp; &nbsp; &nbsp; if &quot;GrowlHelperApp&quot; is in processnames then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;GrowlHelperApp&quot; -- GROWL FAILURE FOR ERROR<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notify with name ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Failure Notification&quot; title ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Import Failure&quot; description &quot;Failed to export &quot; &amp;amp; return &amp;amp; myTitle &amp;amp; ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;\&quot; &nbsp;due to the following error: &quot; &amp;amp; return &amp;amp; errText ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; application name &quot;Entourage to Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; else if &quot;GrowlHelperApp&quot; is not in processnames then -- NON-GROWL ERROR MSG. FOR ERROR<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display dialog &quot;Item Failed to Import: &quot; &amp;amp; errNum &amp;amp; return &amp;amp; errText with icon 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; end try<br />
end tell<br />
<br />
(* SUBROUTINES *)<br />
--TAG SELECTION SUBROUTINE<br />
on Tag_List(userInput, theDelims)<br />
&nbsp; &nbsp; set oldDelims to AppleScript's text item delimiters<br />
&nbsp; &nbsp; set theList to {userInput}<br />
&nbsp; &nbsp; repeat with aDelim in theDelims<br />
&nbsp; &nbsp; &nbsp; &nbsp; set AppleScript's text item delimiters to aDelim<br />
&nbsp; &nbsp; &nbsp; &nbsp; set newList to {}<br />
&nbsp; &nbsp; &nbsp; &nbsp; repeat with anItem in theList<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set newList to newList &amp;amp; text items of anItem<br />
&nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; set theList to newList<br />
&nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; return theList<br />
&nbsp; &nbsp; set AppleScript's text item delimiters to oldDelims<br />
end Tag_List<br />
<br />
--EVERNOTE NOTEBOOK SELECTION SUBROUTINE <br />
on Notebook_List()<br />
&nbsp; &nbsp; tell application &quot;Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; activate<br />
&nbsp; &nbsp; &nbsp; &nbsp; set listOfNotebooks to {} (*PREPARE TO GET EVERNOTE'S LIST OF NOTEBOOKS *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; (*GET THE NOTEBOOK LIST *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; set EVNotebooks to every notebook<br />
&nbsp; &nbsp; &nbsp; &nbsp; repeat with currentNotebook in EVNotebooks<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set currentNotebookName to (the name of currentNotebook)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; copy currentNotebookName to the end of listOfNotebooks<br />
&nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; (*SORT THE LIST *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; set Folders_sorted to my simple_sort(listOfNotebooks)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; (*USER SELECTION FROM NOTEBOOK LIST *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; set SelNotebook to choose from list of Folders_sorted with title &quot;Select Evernote Notebook&quot; with prompt ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Current Evernote Notebooks&quot; OK button name &quot;OK&quot; cancel button name &quot;New Notebook&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if (SelNotebook is false) then (*CREATE NEW NOTEBOOK OPTION *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set userInput to ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text returned of (display dialog &quot;Enter New Notebook Name:&quot; default answer &quot;&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EVnotebook to userInput<br />
&nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EVnotebook to item 1 of SelNotebook<br />
&nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; end tell<br />
end Notebook_List<br />
<br />
--SORT SUBROUTINE<br />
on simple_sort(my_list)<br />
&nbsp; &nbsp; set the index_list to {}<br />
&nbsp; &nbsp; set the sorted_list to {}<br />
&nbsp; &nbsp; repeat (the number of items in my_list) times<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the low_item to &quot;&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; repeat with i from 1 to (number of items in my_list)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if i is not in the index_list then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set this_item to item i of my_list as text<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if the low_item is &quot;&quot; then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set the low_item to this_item<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set the low_item_index to i<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if this_item comes before the low_item then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set the low_item to this_item<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set the low_item_index to i<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the end of sorted_list to the low_item<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the end of the index_list to the low_item_index<br />
&nbsp; &nbsp; end repeat</div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-636</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Tue, 17 Nov 2009 18:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-636</guid>
		<description>Yeah -- My guess is that the &quot;text parser&quot; chokes on anything that looks like XML/HTML while creating the note.

However, it works fine if you create the note using &lt;i&gt;HTML&lt;/i&gt;.  Here is a version of your sample code that does this (modified to be valid HTML):
&lt;code&gt;
set myContent to &quot;&lt;a href=\&quot;http://veritrope.com/\&quot;&gt;Veritrope.com&lt;/a&gt;&quot;
tell application &quot;Evernote&quot;
	set n to create note with html myContent
end tell
&lt;/code&gt;

The note is successfully created with a clickable URL in the body.

I&#039;ve run into this type of problem with the &lt;i&gt;titles of the notes&lt;/i&gt; and put in some code that stripped-out some troublesome typography.   Clearly though, this isn&#039;t as workable of a solution for the note body -- an AppleScript like this shouldn&#039;t modify people&#039;s content, in my opinion.

I have some ideas to work-around but, really, I&#039;d like to get some sense from the Evernote development team if some changes/bug fixes are coming in the near future.  Let&#039;s be sure to ask about it in &lt;a href=&quot;http://bit.ly/4hZjVU&quot; rel=&quot;nofollow&quot;&gt;the AppleScript thread there&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Yeah &#8212; My guess is that the &#8220;text parser&#8221; chokes on anything that looks like XML/HTML while creating the note.</p>
<p>However, it works fine if you create the note using <i>HTML</i>.  Here is a version of your sample code that does this (modified to be valid HTML):</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">set myContent to &quot;&lt;a href=\&quot;http://veritrope.com/\&quot;&gt;Veritrope.com&lt;/a&gt;&quot;<br />
tell application &quot;Evernote&quot;<br />
&nbsp; &nbsp; set n to create note with html myContent<br />
end tell</div></td></tr></tbody></table></div>
<p>The note is successfully created with a clickable URL in the body.</p>
<p>I&#8217;ve run into this type of problem with the <i>titles of the notes</i> and put in some code that stripped-out some troublesome typography.   Clearly though, this isn&#8217;t as workable of a solution for the note body &#8212; an AppleScript like this shouldn&#8217;t modify people&#8217;s content, in my opinion.</p>
<p>I have some ideas to work-around but, really, I&#8217;d like to get some sense from the Evernote development team if some changes/bug fixes are coming in the near future.  Let&#8217;s be sure to ask about it in <a target="_blank" href="http://bit.ly/4hZjVU"  rel="nofollow">the AppleScript thread there</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-635</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Tue, 17 Nov 2009 17:45:37 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-635</guid>
		<description>Btw. I&#039;ve ran into the same error message rob cherny mentioned on a few emails.

I&#039;ve tracked it down to:

&lt;code&gt;set myContent to &quot;&lt;http://veritrope.com/&gt;&quot;
tell application &quot;Evernote&quot;
	set n to create note with text myContent
end tell&lt;/code&gt;

Tried to find, what combination of slash and greater/lesser triggers the error in Evernote, but  didn&#039;t find a logic. 

Post as well on Evernote forum, probably some developers have a clue.</description>
		<content:encoded><![CDATA[<p>Btw. I&#8217;ve ran into the same error message rob cherny mentioned on a few emails.</p>
<p>I&#8217;ve tracked it down to:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">set myContent to &quot;&lt;http://veritrope.com/&gt;&quot;<br />
tell application &quot;Evernote&quot;<br />
&nbsp; &nbsp; set n to create note with text myContent<br />
end tell</div></td></tr></tbody></table></div>
<p>Tried to find, what combination of slash and greater/lesser triggers the error in Evernote, but  didn&#8217;t find a logic. </p>
<p>Post as well on Evernote forum, probably some developers have a clue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-633</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Tue, 17 Nov 2009 16:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-633</guid>
		<description>Thanks Justin.

My additions are small in compare to your whole script. Nice to hear you are working on a rewrite. I&#039;m interested to hear, how you work around the limitations of the AppleScript implementation in the current Evernote client. So of cause I&#039;ll subscribe to your beta list. ;-)</description>
		<content:encoded><![CDATA[<p>Thanks Justin.</p>
<p>My additions are small in compare to your whole script. Nice to hear you are working on a rewrite. I&#8217;m interested to hear, how you work around the limitations of the AppleScript implementation in the current Evernote client. So of cause I&#8217;ll subscribe to your beta list. <img src='http://veritrope.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-632</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Tue, 17 Nov 2009 16:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-632</guid>
		<description>Hi Peter,

By publishing the source code, I had hoped to encourage people to do what you have done -- Great Job! :D

Your fellow users (including me!) can thank you for an additional option to work with our attachments.  (I moved your comment here to the script&#039;s page so that Entourage users would be more likely to find it.)

An update on the script itself: I am in the middle of a pretty substantial rewrite of many of these scripts to include, among other things, moving email attachments into Evernote.  Anyone interested in testing them should sign up for the email list on Veritrope and I&#039;ll contact you when a &quot;sneak preview build&quot; is ready.

And in the meantime, anyone who wants to make changes or suggestions is welcome to do so here!</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>By publishing the source code, I had hoped to encourage people to do what you have done &#8212; Great Job! <img src='http://veritrope.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Your fellow users (including me!) can thank you for an additional option to work with our attachments.  (I moved your comment here to the script&#8217;s page so that Entourage users would be more likely to find it.)</p>
<p>An update on the script itself: I am in the middle of a pretty substantial rewrite of many of these scripts to include, among other things, moving email attachments into Evernote.  Anyone interested in testing them should sign up for the email list on Veritrope and I&#8217;ll contact you when a &#8220;sneak preview build&#8221; is ready.</p>
<p>And in the meantime, anyone who wants to make changes or suggestions is welcome to do so here!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-631</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Tue, 17 Nov 2009 12:23:19 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-631</guid>
		<description>Hi Justin,

thank you very much for your script Entourage into Evernote. Really a nice piece of work.

Currently I have the need to clip not only the email body but as well the attachements into Evernote. Browsed the AppleScript library for the Evernote Mac Client, but it seems there is currently no support to generate a note containing (several) attachements plus some text.

So decided to do some workaround and patch your AppleScript. It now creates individual notes one with the email body (just like yours) and one for each attachement in the email. I then combine the notes manually into a single note after inspecting and removing any unwanted attachments (aka logos etc.). Not a single click solution, but works for me quite well.

The script temporarily writes the attachements to your disk. I&#039;ve hardcoded the destination to a folder named tmp inside your user folder. You have to create it before you can use the script (or change the script). The saved attachements in tmp are automatically deleted once they are imported into Evernote.

Feel free to add this to your script repository and make changes.

Have fun.

Pete

Here is the source:
&lt;code&gt;
(*
http://veritrope.com
Entourage to Evernote
Version 1.1
Nov 17, 2009

Modified by Peter Gutbrod to add clipping of email attachments.

Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/tips/entourage-to-evernote
    
    Some choices inspired by the following scripts/authors:
    -- Mike Hall (http://mph.puddingbowl.org/)
    -- Ernie Soffronoff
    -- Daniel N. Byler&#039;s DEVONthink script
    -- NetNewsWire To Pukka and Yojimbo
    -- Jan Erik Mostrom&#039;s script
    -- David Nunez scripts
    -- MANY, MANY OTHERS!
            
Installation:  A few options....

-- You can highlight the email messages you want to archive into Evernote and double-click this script file;
-- You can save this script to ~/Documents/Microsoft User Data folder or simply drag the script into the Entourage Script Menu Items folder and it is immediately available for use.
-- Keyboard shortcuts can also be assigned to AppleScripts in the script menu using the System Preferences &quot;Keyboard &amp; Mouse Settings&quot;.

FastScripts Installation (Optional, but recommended): 
-- Download and Install FastScripts from http://www.red-sweater.com/fastscripts/index.html
-- Save this script to ~/Library/Scripts/Applications/Microsoft Entourage
-- Set up your keyboard shortcut in FastScripts Preferences
*)

property successCount : 0
property MailTitle : &quot;&quot;
property EVTag : &quot;&quot;
property myTitle : &quot;&quot;

(* CHECK FOR GROWL *)
tell application &quot;System Events&quot;
	set processnames to name of every process
end tell
if &quot;GrowlHelperApp&quot; is in processnames then
	tell application &quot;GrowlHelperApp&quot;
		set the allNotificationsList to {&quot;Success Notification&quot;, &quot;Failure Notification&quot;}
		set the enabledNotificationsList to {&quot;Success Notification&quot;, &quot;Failure Notification&quot;}
		register as application ¬
			&quot;Entourage to Evernote&quot; all notifications allNotificationsList ¬
			default notifications enabledNotificationsList ¬
			icon of application &quot;Evernote&quot;
	end tell
end if

tell application &quot;Finder&quot;
	set TmpFolder to ((folder &quot;tmp&quot; of home) as text)
end tell

(*MAIN PROGRAM *)
tell application &quot;Microsoft Entourage&quot;
	try
		if (selection is not 0) then
			set defaultTag to &quot;Email Message&quot;
			set userInput to ¬
				text returned of ¬
				(display dialog &quot;Enter Tags, separated by colons or commas:&quot; &amp; return &amp; return &amp; ¬
					&quot;NOTE: Default Tag is &#039;Email Message&#039;&quot; default answer defaultTag)
			set theDelims to {&quot;:&quot;, &quot;,&quot;}
			set EVTag to my Tag_List(userInput, theDelims)
			set theMessages to current messages
			set EVnotebook to my Notebook_List()
			repeat with thisMessage in theMessages
				set myTitle to the subject of thisMessage
				set myContent to the content of thisMessage
				set ReplyAddr to the sender&#039;s address of thisMessage
				set EmailDate to the time received of thisMessage
				set myText to &quot;Message from mailto:&quot; &amp; ReplyAddr &amp; &quot; on &quot; &amp; EmailDate &amp; &quot;:&quot; &amp; return &amp; return &amp; myContent
				
				tell application &quot;Evernote&quot;
					set n to create note with text myText ¬
						title myTitle ¬
						notebook ¬
						EVnotebook tags EVTag
					set creation date of n to EmailDate
					set source URL of n to ReplyAddr
				end tell
				
				set theAttachments to the attachments of thisMessage
				repeat with thisAttachment in theAttachments
					set theName to name of thisAttachment
					set FilePath to TmpFolder &amp; theName
					save thisAttachment in FilePath
					
					tell application &quot;Evernote&quot;
						set n to create note from file FilePath ¬
							notebook EVnotebook tags EVTag
						set creation date of n to EmailDate
						set source URL of n to ReplyAddr
					end tell
					tell application &quot;Finder&quot;
						delete file FilePath
					end tell
				end repeat
				set successCount to successCount + 1
			end repeat
			
			if &quot;GrowlHelperApp&quot; is in processnames then
				tell application &quot;GrowlHelperApp&quot; -- GROWL SUCCESS
					notify with name ¬
						&quot;Success Notification&quot; title ¬
						&quot;Import Success&quot; description &quot;Successfully Exported &quot; &amp; successCount &amp; ¬
						&quot; Messages to Evernote!&quot; application name &quot;Entourage to Evernote&quot;
				end tell
				set successCount to 0
			end if
			
		else if &quot;GrowlHelperApp&quot; is in processnames then
			tell application &quot;GrowlHelperApp&quot; -- GROWL FAILURE FOR NO SELECTION
				notify with name ¬
					&quot;Failure Notification&quot; title ¬
					&quot;Import Failure&quot; description ¬
					&quot;No headline or tab selected!&quot; application name &quot;Entourage to Evernote&quot;
			end tell
			
		else if &quot;GrowlHelperApp&quot; is not in processnames then -- NON-GROWL ERROR MSG. FOR NO SELECTION
			display dialog &quot;No headline or tab selected!&quot; with icon 0
		end if
		
		(* ERROR HANDLING *)
	on error errText number errNum
		if &quot;GrowlHelperApp&quot; is in processnames then
			tell application &quot;GrowlHelperApp&quot; -- GROWL FAILURE FOR ERROR
				notify with name ¬
					&quot;Failure Notification&quot; title ¬
					&quot;Import Failure&quot; description &quot;Failed to export &quot; &amp; return &amp; myTitle &amp; ¬
					&quot;\&quot;  due to the following error: &quot; &amp; return &amp; errText ¬
					application name &quot;Entourage to Evernote&quot;
			end tell
		else if &quot;GrowlHelperApp&quot; is not in processnames then -- NON-GROWL ERROR MSG. FOR ERROR
			display dialog &quot;Item Failed to Import: &quot; &amp; errNum &amp; return &amp; errText with icon 0
		end if
	end try
end tell

(* SUBROUTINES *)
--TAG SELECTION SUBROUTINE
on Tag_List(userInput, theDelims)
	set oldDelims to AppleScript&#039;s text item delimiters
	set theList to {userInput}
	repeat with aDelim in theDelims
		set AppleScript&#039;s text item delimiters to aDelim
		set newList to {}
		repeat with anItem in theList
			set newList to newList &amp; text items of anItem
		end repeat
		set theList to newList
	end repeat
	return theList
	set AppleScript&#039;s text item delimiters to oldDelims
end Tag_List

--EVERNOTE NOTEBOOK SELECTION SUBROUTINE 
on Notebook_List()
	tell application &quot;Evernote&quot;
		activate
		set listOfNotebooks to {} (*PREPARE TO GET EVERNOTE&#039;S LIST OF NOTEBOOKS *)
		
		(*GET THE NOTEBOOK LIST *)
		set EVNotebooks to every notebook
		repeat with currentNotebook in EVNotebooks
			set currentNotebookName to (the name of currentNotebook)
			copy currentNotebookName to the end of listOfNotebooks
		end repeat
		
		(*SORT THE LIST *)
		set Folders_sorted to my simple_sort(listOfNotebooks)
		
		(*USER SELECTION FROM NOTEBOOK LIST *)
		set SelNotebook to choose from list of Folders_sorted with title &quot;Select Evernote Notebook&quot; with prompt ¬
			&quot;Current Evernote Notebooks&quot; OK button name &quot;OK&quot; cancel button name &quot;New Notebook&quot;
		
		if (SelNotebook is false) then (*CREATE NEW NOTEBOOK OPTION *)
			set userInput to ¬
				text returned of (display dialog &quot;Enter New Notebook Name:&quot; default answer &quot;&quot;)
			set EVnotebook to userInput
		else
			set EVnotebook to item 1 of SelNotebook
		end if
		
	end tell
end Notebook_List

--SORT SUBROUTINE
on simple_sort(my_list)
	set the index_list to {}
	set the sorted_list to {}
	repeat (the number of items in my_list) times
		set the low_item to &quot;&quot;
		repeat with i from 1 to (number of items in my_list)
			if i is not in the index_list then
				set this_item to item i of my_list as text
				if the low_item is &quot;&quot; then
					set the low_item to this_item
					set the low_item_index to i
				else if this_item comes before the low_item then
					set the low_item to this_item
					set the low_item_index to i
				end if
			end if
		end repeat
		set the end of sorted_list to the low_item
		set the end of the index_list to the low_item_index
	end repeat
	return the sorted_list
end simple_sort
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi Justin,</p>
<p>thank you very much for your script Entourage into Evernote. Really a nice piece of work.</p>
<p>Currently I have the need to clip not only the email body but as well the attachements into Evernote. Browsed the AppleScript library for the Evernote Mac Client, but it seems there is currently no support to generate a note containing (several) attachements plus some text.</p>
<p>So decided to do some workaround and patch your AppleScript. It now creates individual notes one with the email body (just like yours) and one for each attachement in the email. I then combine the notes manually into a single note after inspecting and removing any unwanted attachments (aka logos etc.). Not a single click solution, but works for me quite well.</p>
<p>The script temporarily writes the attachements to your disk. I&#8217;ve hardcoded the destination to a folder named tmp inside your user folder. You have to create it before you can use the script (or change the script). The saved attachements in tmp are automatically deleted once they are imported into Evernote.</p>
<p>Feel free to add this to your script repository and make changes.</p>
<p>Have fun.</p>
<p>Pete</p>
<p>Here is the source:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br />115<br />116<br />117<br />118<br />119<br />120<br />121<br />122<br />123<br />124<br />125<br />126<br />127<br />128<br />129<br />130<br />131<br />132<br />133<br />134<br />135<br />136<br />137<br />138<br />139<br />140<br />141<br />142<br />143<br />144<br />145<br />146<br />147<br />148<br />149<br />150<br />151<br />152<br />153<br />154<br />155<br />156<br />157<br />158<br />159<br />160<br />161<br />162<br />163<br />164<br />165<br />166<br />167<br />168<br />169<br />170<br />171<br />172<br />173<br />174<br />175<br />176<br />177<br />178<br />179<br />180<br />181<br />182<br />183<br />184<br />185<br />186<br />187<br />188<br />189<br />190<br />191<br />192<br />193<br />194<br />195<br />196<br />197<br />198<br />199<br />200<br />201<br />202<br />203<br />204<br />205<br />206<br />207<br />208<br />209<br />210<br />211<br />212<br />213<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">(*<br />
http://veritrope.com<br />
Entourage to Evernote<br />
Version 1.1<br />
Nov 17, 2009<br />
<br />
Modified by Peter Gutbrod to add clipping of email attachments.<br />
<br />
Project Status, Latest Updates, and Comments Collected at:<br />
http://veritrope.com/tips/entourage-to-evernote<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Some choices inspired by the following scripts/authors:<br />
&nbsp; &nbsp; -- Mike Hall (http://mph.puddingbowl.org/)<br />
&nbsp; &nbsp; -- Ernie Soffronoff<br />
&nbsp; &nbsp; -- Daniel N. Byler's DEVONthink script<br />
&nbsp; &nbsp; -- NetNewsWire To Pukka and Yojimbo<br />
&nbsp; &nbsp; -- Jan Erik Mostrom's script<br />
&nbsp; &nbsp; -- David Nunez scripts<br />
&nbsp; &nbsp; -- MANY, MANY OTHERS!<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
Installation: &nbsp;A few options....<br />
<br />
-- You can highlight the email messages you want to archive into Evernote and double-click this script file;<br />
-- You can save this script to ~/Documents/Microsoft User Data folder or simply drag the script into the Entourage Script Menu Items folder and it is immediately available for use.<br />
-- Keyboard shortcuts can also be assigned to AppleScripts in the script menu using the System Preferences &quot;Keyboard &amp;amp; Mouse Settings&quot;.<br />
<br />
FastScripts Installation (Optional, but recommended): <br />
-- Download and Install FastScripts from http://www.red-sweater.com/fastscripts/index.html<br />
-- Save this script to ~/Library/Scripts/Applications/Microsoft Entourage<br />
-- Set up your keyboard shortcut in FastScripts Preferences<br />
*)<br />
<br />
property successCount : 0<br />
property MailTitle : &quot;&quot;<br />
property EVTag : &quot;&quot;<br />
property myTitle : &quot;&quot;<br />
<br />
(* CHECK FOR GROWL *)<br />
tell application &quot;System Events&quot;<br />
&nbsp; &nbsp; set processnames to name of every process<br />
end tell<br />
if &quot;GrowlHelperApp&quot; is in processnames then<br />
&nbsp; &nbsp; tell application &quot;GrowlHelperApp&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the allNotificationsList to {&quot;Success Notification&quot;, &quot;Failure Notification&quot;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the enabledNotificationsList to {&quot;Success Notification&quot;, &quot;Failure Notification&quot;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; register as application ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Entourage to Evernote&quot; all notifications allNotificationsList ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default notifications enabledNotificationsList ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; icon of application &quot;Evernote&quot;<br />
&nbsp; &nbsp; end tell<br />
end if<br />
<br />
tell application &quot;Finder&quot;<br />
&nbsp; &nbsp; set TmpFolder to ((folder &quot;tmp&quot; of home) as text)<br />
end tell<br />
<br />
(*MAIN PROGRAM *)<br />
tell application &quot;Microsoft Entourage&quot;<br />
&nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (selection is not 0) then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set defaultTag to &quot;Email Message&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set userInput to ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text returned of ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (display dialog &quot;Enter Tags, separated by colons or commas:&quot; &amp;amp; return &amp;amp; return &amp;amp; ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;NOTE: Default Tag is 'Email Message'&quot; default answer defaultTag)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set theDelims to {&quot;:&quot;, &quot;,&quot;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EVTag to my Tag_List(userInput, theDelims)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set theMessages to current messages<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EVnotebook to my Notebook_List()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repeat with thisMessage in theMessages<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set myTitle to the subject of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set myContent to the content of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set ReplyAddr to the sender's address of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EmailDate to the time received of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set myText to &quot;Message from mailto:&quot; &amp;amp; ReplyAddr &amp;amp; &quot; on &quot; &amp;amp; EmailDate &amp;amp; &quot;:&quot; &amp;amp; return &amp;amp; return &amp;amp; myContent<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set n to create note with text myText ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title myTitle ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notebook ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EVnotebook tags EVTag<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set creation date of n to EmailDate<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set source URL of n to ReplyAddr<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set theAttachments to the attachments of thisMessage<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repeat with thisAttachment in theAttachments<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set theName to name of thisAttachment<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set FilePath to TmpFolder &amp;amp; theName<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; save thisAttachment in FilePath<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set n to create note from file FilePath ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notebook EVnotebook tags EVTag<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set creation date of n to EmailDate<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set source URL of n to ReplyAddr<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;Finder&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delete file FilePath<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set successCount to successCount + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if &quot;GrowlHelperApp&quot; is in processnames then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;GrowlHelperApp&quot; -- GROWL SUCCESS<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notify with name ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Success Notification&quot; title ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Import Success&quot; description &quot;Successfully Exported &quot; &amp;amp; successCount &amp;amp; ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot; Messages to Evernote!&quot; application name &quot;Entourage to Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set successCount to 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; else if &quot;GrowlHelperApp&quot; is in processnames then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;GrowlHelperApp&quot; -- GROWL FAILURE FOR NO SELECTION<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notify with name ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Failure Notification&quot; title ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Import Failure&quot; description ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;No headline or tab selected!&quot; application name &quot;Entourage to Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; else if &quot;GrowlHelperApp&quot; is not in processnames then -- NON-GROWL ERROR MSG. FOR NO SELECTION<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display dialog &quot;No headline or tab selected!&quot; with icon 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; (* ERROR HANDLING *)<br />
&nbsp; &nbsp; on error errText number errNum<br />
&nbsp; &nbsp; &nbsp; &nbsp; if &quot;GrowlHelperApp&quot; is in processnames then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tell application &quot;GrowlHelperApp&quot; -- GROWL FAILURE FOR ERROR<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notify with name ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Failure Notification&quot; title ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Import Failure&quot; description &quot;Failed to export &quot; &amp;amp; return &amp;amp; myTitle &amp;amp; ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;\&quot; &nbsp;due to the following error: &quot; &amp;amp; return &amp;amp; errText ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; application name &quot;Entourage to Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end tell<br />
&nbsp; &nbsp; &nbsp; &nbsp; else if &quot;GrowlHelperApp&quot; is not in processnames then -- NON-GROWL ERROR MSG. FOR ERROR<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display dialog &quot;Item Failed to Import: &quot; &amp;amp; errNum &amp;amp; return &amp;amp; errText with icon 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; end try<br />
end tell<br />
<br />
(* SUBROUTINES *)<br />
--TAG SELECTION SUBROUTINE<br />
on Tag_List(userInput, theDelims)<br />
&nbsp; &nbsp; set oldDelims to AppleScript's text item delimiters<br />
&nbsp; &nbsp; set theList to {userInput}<br />
&nbsp; &nbsp; repeat with aDelim in theDelims<br />
&nbsp; &nbsp; &nbsp; &nbsp; set AppleScript's text item delimiters to aDelim<br />
&nbsp; &nbsp; &nbsp; &nbsp; set newList to {}<br />
&nbsp; &nbsp; &nbsp; &nbsp; repeat with anItem in theList<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set newList to newList &amp;amp; text items of anItem<br />
&nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; set theList to newList<br />
&nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; return theList<br />
&nbsp; &nbsp; set AppleScript's text item delimiters to oldDelims<br />
end Tag_List<br />
<br />
--EVERNOTE NOTEBOOK SELECTION SUBROUTINE <br />
on Notebook_List()<br />
&nbsp; &nbsp; tell application &quot;Evernote&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; activate<br />
&nbsp; &nbsp; &nbsp; &nbsp; set listOfNotebooks to {} (*PREPARE TO GET EVERNOTE'S LIST OF NOTEBOOKS *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; (*GET THE NOTEBOOK LIST *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; set EVNotebooks to every notebook<br />
&nbsp; &nbsp; &nbsp; &nbsp; repeat with currentNotebook in EVNotebooks<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set currentNotebookName to (the name of currentNotebook)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; copy currentNotebookName to the end of listOfNotebooks<br />
&nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; (*SORT THE LIST *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; set Folders_sorted to my simple_sort(listOfNotebooks)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; (*USER SELECTION FROM NOTEBOOK LIST *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; set SelNotebook to choose from list of Folders_sorted with title &quot;Select Evernote Notebook&quot; with prompt ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Current Evernote Notebooks&quot; OK button name &quot;OK&quot; cancel button name &quot;New Notebook&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if (SelNotebook is false) then (*CREATE NEW NOTEBOOK OPTION *)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set userInput to ¬<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text returned of (display dialog &quot;Enter New Notebook Name:&quot; default answer &quot;&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EVnotebook to userInput<br />
&nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set EVnotebook to item 1 of SelNotebook<br />
&nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; end tell<br />
end Notebook_List<br />
<br />
--SORT SUBROUTINE<br />
on simple_sort(my_list)<br />
&nbsp; &nbsp; set the index_list to {}<br />
&nbsp; &nbsp; set the sorted_list to {}<br />
&nbsp; &nbsp; repeat (the number of items in my_list) times<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the low_item to &quot;&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; repeat with i from 1 to (number of items in my_list)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if i is not in the index_list then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set this_item to item i of my_list as text<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if the low_item is &quot;&quot; then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set the low_item to this_item<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set the low_item_index to i<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if this_item comes before the low_item then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set the low_item to this_item<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set the low_item_index to i<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<br />
&nbsp; &nbsp; &nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the end of sorted_list to the low_item<br />
&nbsp; &nbsp; &nbsp; &nbsp; set the end of the index_list to the low_item_index<br />
&nbsp; &nbsp; end repeat<br />
&nbsp; &nbsp; return the sorted_list<br />
end simple_sort</div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: rob cherny</title>
		<link>http://veritrope.com/tips/entourage-to-evernote#comment-258</link>
		<dc:creator>rob cherny</dc:creator>
		<pubDate>Tue, 02 Jun 2009 13:26:10 +0000</pubDate>
		<guid isPermaLink="false">http://veritrope.com/?p=1148#comment-258</guid>
		<description>Hey not off hand. But the last couple tests I ran were fine, so I&#039;m not sure if it was just a more complicated message or what. I sent some &quot;Plain Text&quot; and some &quot;Rich Text&quot; versions to myself and they imported just fine, so maybe they&#039;re edge cases?

I&#039;ll keep trying and let you know if I find something more consistent.

thanks again!</description>
		<content:encoded><![CDATA[<p>Hey not off hand. But the last couple tests I ran were fine, so I&#8217;m not sure if it was just a more complicated message or what. I sent some &#8220;Plain Text&#8221; and some &#8220;Rich Text&#8221; versions to myself and they imported just fine, so maybe they&#8217;re edge cases?</p>
<p>I&#8217;ll keep trying and let you know if I find something more consistent.</p>
<p>thanks again!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (user agent is rejected)

Served from: zaurak.lunarpages.com @ 2010-03-11 09:37:18 -->