Page 1 of 1

Basic Evernote search script

Posted: Fri Jun 28, 2013 12:49 am
by macnai
The built in evernote search doesn't work for me. It puts it in the search box bit nothing happens and I have to retype it. I'm trying to do this via applescript from Launchbar. I'm a total programming noob but I got this far

tell application "Evernote"
set query string of window 1 to "test"
end tell

That will activate Evernote and search for 'test' which is what I hoped the built in one would do but doesn't.

Now what do I do to get text I type into Launchbar to be the search term? I looked up the help and I'm ashamed to say I couldn't follow it. This is what I've got (don't laugh):

on handle_string(test)
tell application "Evernote"
set query string of window 1 to "handle_string"
end tell
end handle_string

This isn't working. Nothing seems to happen when I run it, Evernote doesn't even activate. What format does the script need to be saved in for this too? Application? Script?

If someone can kindly walk me through the process (in basic terms) I'd be grateful. I hope to also write a version that will search with [intitle:"test"] or [tag:"test"] straight from LB. I reckon I can manage that if I can get one working script as a template.

Re: Basic Evernote search script

Posted: Wed May 14, 2014 1:09 pm
by rmathes
i'd love to see a way to initiate an Evernote search from LaunchBar.

Does Objective Development have anyone who reads these forums? Sure doesn't seem like it.

Re: Basic Evernote search script

Posted: Tue Jun 17, 2014 12:35 pm
by ptujec
It happens to the best of us ;)

You don't really need a script for that. Just press spacebar when Evernote is selected.It seems to be a bit buggy on Evernotes side but it should work.

If you want to make sure your question is hear send an email. They usually answer those most reliable.