Basic Evernote search script

Sharing and discussing custom actions for LaunchBar
Post Reply
macnai
Posts: 1
Joined: Fri Jun 28, 2013 12:39 am

Basic Evernote search script

Post by macnai » Fri Jun 28, 2013 12:49 am

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

rmathes
Posts: 16
Joined: Thu Dec 25, 2008 6:29 pm

Re: Basic Evernote search script

Post by rmathes » Wed May 14, 2014 1:09 pm

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.

ptujec
Wizard
Wizard
Posts: 321
Joined: Fri Dec 19, 2008 11:36 am
Contact:

Re: Basic Evernote search script

Post by ptujec » Tue Jun 17, 2014 12:35 pm

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.

Post Reply