Jump to content


Level 3
  • Content Count

  • Joined

  • Last visited

Posts posted by Veritrope

  1. The new AppleScript improvements that are coming in Version 1.11 will allow you to do this!

    The bare-bones code would look something like this:

    tell application "Evernote"
    set theMessages to the selection
    repeat with thisMessage in theMessages
    set source URL of thisMessage to "New Tag"
    end repeat
    end tell

    ...where "New Tag" would be replaced with whatever you wanted to write into the Source URL field.

    Once the new Mac client is released, I'll probably publish a version that lets you type your new tag in a dialog box instead of having to manually tweak the code every time.

    Would that work for your workflow? How about everyone else?

  2. You can just call me "Justin"! ;)

    I don't have a version like that but, as always, I am happy to tailor scripts to individual workflows.

    If anyone is interested, you can fill out this form with as many specifics as possible:


    I'll take a look and get back to you with an estimate.


    Back to the published script for a moment -- I've been getting a lot of downloads, but not a lot of comments. Anyone else try it? Thoughts/suggestions/etc. are welcome on the script's page (link in my earlier post), on Twitter, or via the Veritrope.com Contact page!

  3. Sadly, there's currently no way to expose which items you've selected in Evernote to an AppleScript.

    (See this thread for more: viewtopic.php?f=38&t=12604&p=62519&hilit=applescript#p62519 )

    My personal belief is that a few simple improvements to the AppleScript functionality of Evernote would allow users to interact with their notes in a lot of very useful ways not currently possible.

    If you agree, you should add your voice to those asking for Evernote's development team to bump AppleScript up on their priority list. They do read and respond to feedback -- so don't be shy about asking for what you need! :D

  4. I've written AppleScripts for some of my clients to do this... :D

    For example, here's one that I wrote for someone who wanted to be able to change the Month and Year of every item in a selected Notebook:

    (Comments included to give you a sense for how each part works)

    tell application "Evernote"
    set listOfNotebooks to {}
    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

    set Folders_sorted to my simple_sort(listOfNotebooks)

    set SelNotebook to choose from list of Folders_sorted with title "Select Notebook For Date Change" with prompt ¬
    "Available Evernote Notebooks" OK button name "OK"
    set EVnotebook to item 1 of SelNotebook

    set listofNotes to {}

    (*CHANGE YEAR *)
    display dialog "" & ¬
    "Enter Year" with title "Evernote | Date Changer" default answer "" buttons {"OK", "Cancel"} default button "OK" cancel button ¬
    "Cancel" with icon path to resource "Evernote.icns" in bundle (path to application "Evernote")
    set dialogresult to the result
    set changeyear to text returned of dialogresult
    set ButtonSel to button returned of dialogresult

    if changeyear is "" then error
    if changeyear is not "" then ¬
    set changeyear to changeyear as number
    if changeyear mod 1 is equal to 0 then
    set changeyear to changeyear div 1
    exit repeat
    end if
    on error
    end try
    end repeat

    set the low_value to 1
    set the high_value to 12
    display dialog "" & ¬
    "Enter Month (1-12)" with title "Evernote | Date Changer" default answer "" buttons {"OK", "Cancel"} default button "OK" cancel button ¬
    "Cancel" with icon path to resource "Evernote.icns" in bundle (path to application "Evernote")
    set dialogresult to the result
    set changemonth to text returned of dialogresult
    set ButtonSel to button returned of dialogresult

    if changemonth is "" then error
    if changemonth is not "" then ¬
    set changemonth to changemonth as number
    if changemonth mod 1 is equal to 0 and ¬
    changemonth is greater than or equal to low_value and ¬
    changemonth is less than or equal to high_value then
    set changemonth to changemonth div 1
    exit repeat
    end if
    on error
    end try
    end repeat

    (* DATE CHANGES *)
    set allNotes to every note in notebook EVnotebook
    repeat with currentNote in allNotes
    set CreNotes to the creation date of currentNote
    set CreDates to the day of CreNotes
    set CreMonths to the month of CreNotes
    set CreYears to the year of CreNotes
    set NewCreDate to "" & changemonth & " " & CreDates & ", " & changeyear
    set (creation date) of currentNote to date NewCreDate

    set ModNotes to the modification date of currentNote
    set ModDates to the day of ModNotes
    set ModMonths to the month of ModNotes
    set ModYears to the year of ModNotes
    set NewModDate to "" & changemonth & " " & ModDates & ", " & changeyear
    set (modification date) of currentNote to date NewModDate

    end repeat
    end tell

    on replaceString(theString, theOriginalString, theNewString)
    set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, theOriginalString}
    set theStringParts to text items of theString
    if (count of theStringParts) is greater than 1 then
    set theString to text item 1 of theStringParts as string
    repeat with eachPart in items 2 thru -1 of theStringParts
    set theString to theString & theNewString & eachPart as string
    end repeat
    end if
    set AppleScript's text item delimiters to od
    return theString
    end replaceString

    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 ""
    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 "" 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

  5. For what it's worth --

    Instead of using an "Evernote Profile" in the ScanSnap Manager, my ScanSnap/Evernote workflow makes use of a folder that I've created on my Desktop named "@EVERNOTE":


    For good measure (and easy access), I've also added a shortcut to it in my "Places" within the Finder sidebar:


    Anyhow, I've attached a "folder action" to the @EVERNOTE folder that runs a special import script on any file I scan, save, or drop into this folder (but you could easily use Hazel to do the same type of thing!). The script contains a variation of a tagging and sorting subroutine that I use in many of my AppleScripts for Evernote -- and this lets me tag and place items into specific Notebooks as soon as a new items are saved to the folder:


    Once the import into Evernote is complete, the files are automatically put into the Trash.

    I personally prefer this workflow approach because it allows me (and my clients) to start to think of Evernote as an extension of the Mac OS File System itself and not "just another note-taking app".... sort of like a super-searchable Dropbox.

    I also like this approach to ScanSnapping because that import dialog box forces me to not be lazy and to tag and sort things on their way in!

    (Not that any of you would forget to do that...) :D

    There's even more you can do with Folder Actions, Hazel, and Evernote.... and I'll take the time to write it up as a blog post if enough people are interested and think it would be helpful.

  6. Easiest Way to Export Address Book Entries Into Evernote:

    Highlight the Address Book => Print => Choose the style to print from the Style pop-up menu (I'd suggest LIST). If you don’t see these options, open the disclosure triangle after the printer’s name.

    Then, select PDF => Save PDF to Evernote.

    You'll end up with a read only, multi-page PDF file with all of your entries.


    You can also drop an Address Book Archive into Evernote as a backup but, since that file is a "Package", Evernote will put it inside a ZIP file. Useful for moving an archive between computers or an additional backup, but not-so-much for actually being able to see what's inside.

    Hope this helps!

  7. Pendolino -- thought I'd answer your question from the other thread in this one:

    Short answer -- There's no way that I know of to trigger Evernote to open up directly to a notebook.

    You can use AppleScript to retrieve the titles of every note in a notebook and create it's own list. Presumably, you could adapt the code in the other thread to allow you to select a note from that list and open up the individual notes that way. Ugly -- but it would work.

    Rob Lewis, Pendolino, and other Mac Users

    Now that the transition to new CSS-rich notes is almost done (and the Mac team has an additional senior developer on board), I think that this is the time to make your need for AppleScript improvements known.

    • Like 1

  8. I think that there **IS** a way to do it via AppleScript, but it's a bit of a hack.... give this a shot if you're comfortable with that! :D

    (The usual caveats apply: This is unsupported and may stop working if Evernote changes its plumbing.)


    • 1.) Do a Spotlight search for the title of the note you want to open via AppleScript (in your example, your daily scratchpad) and select "Show All" from the menu when the results begin to be listed;
      2.) When the Search window opens with the full results of your Spotlight Search, find your note in the listing. (List view is probably easiest for this as you can quickly skim the list to identify "Evernote Note" in the "Kind" column)
      3.) When you've found the note, highlight it and look at the bottom of the search window for the Path of the file (if you don't see a path, you can see it in the Info window by pressing Command+I).
      4.) The note name in the file path will follow a format of pXXXXX.evernote -- the X's being numbers (i.e., "p12345.evernote"). Take note of the numbers.
      5.) Open up AppleScript Editor and paste in the following code:

    property notepath : "/Library/Caches/Metadata/com.evernote.Evernote/pXXXXX.evernote"
    set myPath to POSIX path of (path to home folder)
    set filePath to "" & myPath & notepath & ""
    set command to "open " & quoted form of filePath
    do shell script command
    end try

    6.) Replace the XXXXX in the "property notepath" line to the number you noted in Step 4. Save the script **AS AN APPLICATION** ("Save As..." Menu) with a descriptive name (like "Open Daily Scratchpad").

    You should now be able to click on the script icon to open your note and -- assuming that the thing actually works -- then also be able to set up a keyboard shortcut to trigger this script and open your note on demand.

    Hope this helps!

  9. Ahhh....sorry! After re-reading your post, I see that I had it backwards!

    To answer some of your questions:

    1.) Often times, the Windows key matches up to the Command key (that is -- if you are using a Windows keyboard with your Mac). If not, it's easy to set it up to be that way in System Preferences=>Keyboard=>Modifier Keys.

    2.) If you've already taken the step to use a program to try to cut-and paste the text from your note, it really isn't much of a leap to use an AppleScript to export text. I have written an AppleScript that exports notes your select to text files (RTF). Instructions and download link is here -- http://veritrope.com/tips/evernote-rtf-export.

  10. One concept that has occurred to me is a sort of "meta-tag"....

    You could set it up sort of like a saved search and drop selected items on it to apply multiple tags at once!

    For example, let's say I have a 1973 Ford Pinto.

    Every time I add a note related to it, I want to be able to apply the same set of tags.

    If there were a "1973 Ford Pinto" meta-tag, I could drop the new note on it and instantly have my tag field populated with my pre-saved tag series... things like:

    • [*:3spdcga6]Ford

    Whatever.... you get the idea. :)

    And now that my "usual Pinto tags" have been added to start the tagging, I can quickly go through and add additional ones specific to each note.

    Meta-tags could have their own spot in the sidebar, or they could live in the main tag sidebar but look different that single tags somehow.

    Just a thought...

  11. Neilio,

    I think almost everyone here "feels your pain" about the limited Export options.

    If you skim through some of the other recent threads relating to formatting and import/export issues, you'll see that Evernote is in the process of reworking the code of how notes are displayed and rendered. My guess is that they want to get that out the door before trying to tackle ways of exporting the newer markup. (And that *IS* just a guess on my part). In the interim, there are number of AppleScripts which can get your stuff from Evernote to Yojimbo, for example. (A link to the directory is in my signature).

    Granted -- this is an intermediate step and not true drag-and-drop export... but at least it may give you some piece of mind that your stuff isn't totally locked in.

    Hope this helps!

  • Create New...