Skip to content

Instantly share code, notes, and snippets.

@hugobuddel
Created November 25, 2015 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugobuddel/5bd0b6b5b477502721e6 to your computer and use it in GitHub Desktop.
Save hugobuddel/5bd0b6b5b477502721e6 to your computer and use it in GitHub Desktop.
Move cursor to current match when escape-ing the find-in-note search box of Evernote.
; Script to properly exit the search-in-note functionality in Evernote
; through the Escape key. The script ensures that the cursor is moved
; to the start of the currently selected match. See
; https://discussion.evernote.com/topic/89131-exit-search-mode-normally-maintaining-cursor-location/
#IfWinActive ahk_class ENMainFrame ; Evernote
Escape::
; Search for the dark orange highlight of the current search match.
PixelSearch, theX, theY, 0, 0, 4000, 4000, 0xff9632, 2, Fast RGB
; Click there.
Click %theX% %theY%
return
#IfWinActive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment