Get Currently Selected Items In Evernote

Description

This is a basic "handler" which can be used in your script to find out which notes are currently selected in Evernote. To use it, you can reference it in the main part of your script with my Evernote_Selection() The result of this is handler is saved as "evernote_selection" and can then be used elsewhere to do fun stuff with your Evernote items!

The Code

--GET SELECTION IN EVERNOTE
on Evernote_Selection()
    tell application "Evernote"
        try
            set evernote_selection to selection
        end try
    end tell
end Evernote_Selection

One Response to “Get Currently Selected Items In Evernote”

  1. Robert Homes February 16, 2011 at 1:17 am #

    Okay, so you got the “selection”. Now, how do you get the title of the first (and probably only) item of the selection? And tell me why this throws an error:

    set T to (title of item 1 of selection)

    and why this

    log (title of item 1 of selection)

    displays only the “id” of the selected note, not the note’s title.

    Thanks!