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 withmy 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
on Evernote_Selection()
tell application "Evernote"
try
set evernote_selection to selection
end try
end tell
end Evernote_Selection
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!