jshanker 30 Posted May 22, 2021 Share Posted May 22, 2021 I'm using Windows version 6.25.1.9091 I have a keyboard shortcut to launch a new note using this command that I use all the time: "C:\Program Files (x86)\Evernote\Evernote\Evernote.exe" /NewNote I've been trying to come up with a way of using a similar keyboard shortcut but in this case to launch a partially pre-filled search. Specifically I'm often searching intitle: and I'd like to press a button that launches evernote with the string intitle: already in the search field. Currently I do this with autohotkey but it would be smoother and less error prone if I could send it via command line. Is that possible? I've tried things like: "C:\Program Files (x86)\Evernote\Evernote\Evernote.exe" /q "intitle:1" and "C:\Program Files (x86)\Evernote\Evernote\Evernote.exe" shownotes /q "intitle:1" with and without the "1" (figuring I could backspace over it) but none of those execute the search. Thanks for any leads! Link to comment
Level 5* gazumped 12,085 Posted May 23, 2021 Level 5* Share Posted May 23, 2021 Hi. Why not just use AHK (or similar) to generate the standard search and leave your cursor in the field at the correct point? I use Phrase Express and Text Blaze (a browser add-in) both of which can do this... Link to comment
Level 5 PinkElephant 8,863 Posted May 23, 2021 Level 5 Share Posted May 23, 2021 This is the EN developers web site https://dev.evernote.com Link to comment
jshanker 30 Posted May 23, 2021 Author Share Posted May 23, 2021 2 hours ago, gazumped said: Hi. Why not just use AHK (or similar) to generate the standard search and leave your cursor in the field at the correct point? I use Phrase Express and Text Blaze (a browser add-in) both of which can do this... That's how I'm currently doing it, with the following script in AHK: +F6:: IfWinExist All Notebooks - xxxxx@xxxxxx.com - Evernote WinActivate Send, {F6 down} sleep, 50 Send, {F6 up} sleep, 200 Send intitle: return So while F6 is the normal global search SHIFT-F6 does my special INTITLE: search For the most part this works well but I thought if I could trigger it from a batch I avoid the always-present risk that AHK inputs the keystrokes into the wrong window due to some extraneous lag. Slightly off topic, but if you're an AHK user, do you know if there's a way to send a hotkey to AHK from the command line? That is, using my script above is there a way to have a batch file do what SHIFT-F6 normally does? Thanks for the help! Link to comment
jshanker 30 Posted May 23, 2021 Author Share Posted May 23, 2021 I found the a_args parameter in another hotkey section of my main AHK script (I recalled using this once before) so I'll play around with that. @PinkElephant I've been through the dev site but couldn't locate what I'm looking for, most likely user error on my part, alas. Link to comment
Level 5* DTLow 5,746 Posted May 23, 2021 Level 5* Share Posted May 23, 2021 18 hours ago, jshanker said: if I could send it via command line. For command line parameters, see the documentation at https://dev.evernote.com/doc/articles/enscript.php Link to comment
jshanker 30 Posted May 23, 2021 Author Share Posted May 23, 2021 8 minutes ago, DTLow said: For command line parameters, see the documentation at https://dev.evernote.com/doc/articles/enscript.php I did review that but have not found the answer. Part of the problem may be that a pretty critical page appears to be defunct: The query string is formatted according to the search grammar. To The link above is to a reference on the dev site to search grammar. That link (to search grammar) doesn't appear to work, it is the following URL: https://dev.evernote.com/doc/cloud/chapters/search_grammar.php and returns an error for me from multiple browsers and machines. Link to comment
jshanker 30 Posted May 23, 2021 Author Share Posted May 23, 2021 Thanks for everyone's help above. I've improved my AHK approach at least with the following: If (A_Args[1] = "evernote_intitle") gosub, evernote_intitle evernote_intitle: +F6:: IfWinExist All Notebooks - xxxx@xxx.com - Evernote WinActivate Send, {F6 down} sleep, 50 Send, {F6 up} sleep, 200 Send intitle: return and now a batch file with the following line: "C:\Program Files\AutoHotkey\AutoHotkeyU64.exe" "D:\path_to_ahk\AutoHotkey.ahk" evernote_intitle will launch my desired intitle search as reliably as I'm currently able to do. Would still be interested in passing the search parameters to EN but without that search grammar page I suspect I won't get much further. Link to comment
Level 5* CalS 5,310 Posted May 23, 2021 Level 5* Share Posted May 23, 2021 Different approach. WindowsKey + (number 1 to 9) will open the app in that position in the taskbar. So something like the below should work if EN is the 8th app in line, put in AHK language. Doesn't matter if EN is open or not, will open or go to the window. FWIW. Win+8 Sleep Ctrl+Shift+F Sleep intitle: 1 Link to comment
jshanker 30 Posted May 23, 2021 Author Share Posted May 23, 2021 6 minutes ago, CalS said: Different approach. WindowsKey + (number 1 to 9) will open the app in that position in the taskbar. So something like the below should work if EN is the 8th app in line, put in AHK language. Doesn't matter if EN is open or not, will open or go to the window.. FWIW. Win+8 Sleep Ctrl+Shift+F Sleep intitle: Always amazing when you learn something new about something you've been using for 20+ years. I am a huge fan of keyboard shortcuts but somehow never new about the WIN-1 through 8!! Very cool and I'll definitely be making use of that, thanks!! I don't think that will work for me in this case since I nearly always have some notes open and it appears that the WIN-3 shortcut just opens whatever's at the top of the list which (annoyingly) is not necessarily the main application window. That actually always feels like a mistake to me -- If I click on the Evernote tile on my windows taskbar (forgive me, right now I have a lot of notes open) this is what it looks like: I've never understood why the main application isn't at the top of the list, but in this case it makes the WIN - # shortcut unpredictable unless I have all my notes closed (not something I'm likely to achieve any time soon. :-) Link to comment
Level 5* DTLow 5,746 Posted May 23, 2021 Level 5* Share Posted May 23, 2021 1 hour ago, jshanker said: The link above is to a reference on the dev site to search grammar. That link (to search grammar) doesn't appear to work, it is the following URL: Link to Evernote's search grammar https://help.evernote.com/hc/en-us/articles/208313828 Link to comment
Level 5* CalS 5,310 Posted May 23, 2021 Level 5* Share Posted May 23, 2021 1 hour ago, jshanker said: I don't think that will work for me in this case since I nearly always have some notes open and it appears that the WIN-3 shortcut just opens whatever's at the top of the list which (annoyingly) is not necessarily the main application window. Hmmm. Just worked for me. I opened three notes in their own windows and then went to email. The Win hot key opened EN in the main window. Though YMMV. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now