Jump to content
Updates to the Evernote Discussion Forums! Read more... ×
MrPhil

Applescript: Search specific Notebook for Note Title starting with...

Recommended Posts

Hi guys; struggling here ....

 

Need to search a specific notebook for a note whose title starts with a string.

 

Notebook: 2014-2015 Notes

Title to Search for: XXX -

 

I can search OK, but my search searches all notebooks and not the one I am specifying, also I don't seem to be able to work out how to search for titles starting with the text, as it finds notes with the text anywhere in the title.

 

I am using...

tell application id "com.evernote.evernote"	set nRef to "351 -"	set notebook1 to "2014-2015 Notes"	set myNotes to find notes "intitle:" & nRef	repeat with myNote in myNotes		display dialog ((myNote's title) as string)	end repeatend tell

Can someone tell me what I am doing wrong?

 

Many thanks

 

Phil

 

Share this post


Link to post

Hi Phil,

 

Actually you're not doing anything wrong.  "intitle" does a "contains" search; the search grammar doesn't support a "starts with" search for the title field AFAIK.  You'll likely have to do your own post-processing of returned notes to weed out the ones with titles you don't want.

  • Like 1

Share this post


Link to post

×