why? 37 Posted June 2, 2014 Share Posted June 2, 2014 These new weblinks are extremely frustrating. I don't want them. I need Evernote to spring into action when I click on an Evernote link not my web browser. I do not understand why this option has eclipsed the classic link? I have Evernote on all my devices and the internal link opens the app on whichever device I'm using no matter where it was created. Using Evernote in a browsers, especially on mobile devices is a nightmare, which I assume is why we have the apps! Please O please give us an option to change the default links. There are some reasons I need internal links: 1. I do not save passwords in browsers and need to constantly log in.2. Evernote is always running, my browser isn't.3. I don't always have internet access.4. It is so much easier to have applications that link to Evernote have those links open in the Evernote app and not the browser. The browser app is far inferior to the actual app on my mac. So, question: How do I set the default linking method to be the classic links? Why? I use a number of Keyboard Maestro actions which are now broken as the require the classic link which is difficult to simulate using Keyboard Maestro. Link to comment
Sentinel 195 Posted June 2, 2014 Share Posted June 2, 2014 The following discussion points out how to obtain the classic link. It will work as long as your "Option" button is functioning properly. https://discussion.evernote.com/topic/56333-evernote-internal-links-gone/ Link to comment
why? 37 Posted June 2, 2014 Author Share Posted June 2, 2014 Many thanks, but this is not very practical. Firstly, this only works with right-clicking the note. Secondly, there seems to be no way to simulate this in Keyboard Maestro, hence the question. Link to comment
why? 37 Posted June 2, 2014 Author Share Posted June 2, 2014 The more I use this the more astounded I am at this decision to make the default link a link online. Here's my workflow: 1. Highlight EN note2. Copy llink3. Paste into Omnifocus (or wherever)4. Click on link in Omnifocus and hey presto, my browser opens EN website opens and a window pops up asking me if I want to install EN? What were you thinking? Rant over Link to comment
Level 5* gazumped 11,652 Posted June 2, 2014 Level 5* Share Posted June 2, 2014 The more I use this the more astounded I am at this decision to make the default link a link online. Here's my workflow: 1. Highlight EN note2. Copy llink3. Paste into Omnifocus (or wherever)4. Click on link in Omnifocus and hey presto, my browser opens EN website opens and a window pops up asking me if I want to install EN? What were you thinking? Rant over Hi - user forum here, so I can quite truthfully say that I wasn't thinking anything; and rant all you want, it ain't going to worry me. Devs do read these posts, so your point has been made, but to make sure you get a hearing you might want to submit some feedback via the support request link (see below). There is a post in the thread somewhere about Evernote doing this for good reasons however, so they might still be unwilling to rewind that particular change... Link to comment
why? 37 Posted June 3, 2014 Author Share Posted June 3, 2014 I have submitted some feedback on this to EN I'm still looking to find a way to allow Keyboard Maestro to obtain the classic note link. Does anyone know if this is possible via applescript and if so how? Is there a way via the terminal to change the default linking to the classic link? Link to comment
patnpm 30 Posted June 8, 2014 Share Posted June 8, 2014 If you look in the Keyboard Maestro Yahoo group, this question is comprehensively solved by a Christopher Stone, who may or may not be on here. The link is https://groups.yahoo.com/neo/groups/keyboard_maestro/conversations/topics/6843 and essentially the Applescript which will copy the classic note link to your clipboard is tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get note link of aNote)end ifend tell I've tried it and it works perfectly. Thankyou Mr Stone! Link to comment
DanielB 0 Posted July 19, 2014 Share Posted July 19, 2014 This was super helpful. Just wanted to share how I enhanced the script for myself a bit to add the title of the note with the link. tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get title of aNote) & return & (get note link of aNote)end ifend tell Link to comment
Level 5* JMichaelTX 4,117 Posted July 20, 2014 Level 5* Share Posted July 20, 2014 AppleScript to Copy EN Note Link (Classic) to Clipboard as RTF (Click-able link) Many thanks to all of you above who have contributed to this script. The one thing it was lacking, IMO, was the ability to paste into another app as a click-able link that used the Note Title. After much research, I have found how to do this, and have compiled the following script. The data this script puts on the Clipboard is of type RTF (rich text format), and should be acceptable to most, if not all, Mac apps. So when you paste it (manually) you will get a "normal" looking HTML hyperlink with the Note Title as the text of the link. EDIT: Sat, Jan 23, 2016 at 8:34 PM CST I am now maintaining all of my scripts on GitHub Gists You can always find the latest version of this script at: [EN] Classic - Evernote Mac - Put Classic Note Link on Clipboard as Rich Text using Note Title ———————————————————————————————————— Here is an example I pasted by hand (CMD-V) into Outlook 2011 Calendar item: Link to comment
joebuhlig 0 Posted October 31, 2014 Share Posted October 31, 2014 Thanks, JMichael! That's exactly what I needed! Link to comment
bpwhistler 12 Posted August 30, 2015 Share Posted August 30, 2015 I know this is an old thread, but I'm hoping someone is still monitoring it. I tried your script @JMichael (I also tried the script listed by patnpm and got similar results) and got the following info in my clipboard: /var/folders/vl/h25jt8z17992wryf5ljknr0h0000gn/T/Keyboard-Maestro-Script-AE6A9F97-1BA8-46FB-9C32-6F7AE073CB71:2287:2309: execution error: Evernote got an error: Can’t make link of note id "x-coredata://6770D54B-DE1D-4268-8765-FA83B2C7E3DC/ENNote/p2363" of notebook "File Cabinet" into type specifier. (-1700) I would love to be able to use Keyboard Maestro to get classic links. Any help would be greatly appreciated. Link to comment
Level 5* JMichaelTX 4,117 Posted August 31, 2015 Level 5* Share Posted August 31, 2015 I tried your script @JMichael (I also tried the script listed by patnpm and got similar results) and got the following info in my clipboard: /var/folders/vl/h25jt8z17992wryf5ljknr0h0000gn/T/Keyboard-Maestro-Script-AE6A9F97-1BA8-46FB-9C32-6F7AE073CB71:2287:2309: execution error: Evernote got an error: Can’t make link of note id "x-coredata://6770D54B-DE1D-4268-8765-FA83B2C7E3DC/ENNote/p2363" of notebook "File Cabinet" into type specifier. (-1700) I would love to be able to use Keyboard Maestro to get classic links. Your error msg suggests some interaction with KM. You might try my AppleScript in a direct mode without KM.Before you run the AppleScript, make sure you have selected one, and only one, Note in the EN Note list. Try that, and let me know how it goes. Link to comment
bpwhistler 12 Posted August 31, 2015 Share Posted August 31, 2015 Hi JMichael...I ran the script from Script Editor and received this error message: Evernote got an error: Can’t make link of note id "x-coredata://6770D54B-DE1D-4268-8765-FA83B2C7E3DC/ENNote/p2363" of notebook "File Cabinet" into type specifier. I made sure there was only a single note selected. Link to comment
bpwhistler 12 Posted August 31, 2015 Share Posted August 31, 2015 I ran this script tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get note link of aNote)end ifend tell And received this error: "Evernote got an error: Can’t make link of note id \"x-coredata://6770D54B-DE1D-4268-8765-FA83B2C7E3DC/ENNote/p2360\" of notebook \"Outlines\" into type specifier." number -1700 from link of note id "x-coredata://6770D54B-DE1D-4268-8765-FA83B2C7E3DC/ENNote/p2360" of notebook "Outlines" to specifier Link to comment
patnpm 30 Posted August 31, 2015 Share Posted August 31, 2015 I don't know how they do this, and it all gets very confusing, but... If you are in EN and do a 'copy note link' from the menu, and then paste the link into a note in EN (even into the same note), you get an evernote:///... formatted link. If you then do the same paste into e.g. Textedit, you get a http:///... formatted link. So to get the evernote:/// link using keyboard maestro, you need to write a macro to a) copy the note link paste it into the note c) select the pasted link d) copy the text of the link (after using ⌘K) e) and you now have the TEXT of the evernote link in your clipboard which you can use anywhere. e.g. Set Variable ‘evekk’ to Text ‘eve%ICUDateTime%yyMMddHHmmss%’ Set Clipboard to Text ‘%Variable%evekk%’ Type the ⌘V Keystroke Type the ⌃⌥⌘L Keystroke Type the ⌥⇧Left Arrow Keystroke Pause for 1 Seconds Type the ⌘K Keystroke Type the ⌘V Keystroke Type the Return Keystroke Pause for 1 Seconds Type the ⌘C Keystroke Type the Right Arrow Keystroke Type the ⌘K Keystroke Type the Space Keystroke Type the ⌘A Keystroke Pause for 1 Seconds Type the ⌘C Keystroke makes a unique (by time) link and you end up with the text in your clipboard Link to comment
bpwhistler 12 Posted September 1, 2015 Share Posted September 1, 2015 I must have done something very wrong patnpm...after using the KM macro on a note...this was the output: eve150831213532 Link to comment
patnpm 30 Posted September 1, 2015 Share Posted September 1, 2015 The macro has been taken out of a larger macro so you may need to debug it yourself. eve1508... is my unique number generated for each important note, just incase linking breaksdown. The steps are: generate the text of the link (eve1508...... etc)paste that into the notecopy the link of the noteselect the link text⌘Kpaste in the link of the noteclose the link edit boxselect the link⌘K again insert a space after the evernote:\\\... linkselect allcopy escape (without saving the edited link) The point behind the space after the link? If you don't do that then evernote will 'intelligently' assume you want an 'http: style link next time you paste. With the space you just get the text of the link in your clipboard, and you are good to go. Just don't save the link edit box with the space in as the link will no longer work (actually I think you won't be able to save it) I don't know how they have made the linking dynamic like this, but it is a pain. This looks complicated, but is now second nature to me and I have links everywhere which work fine with a single keyboard press in keyboard maestro Nic Link to comment
why? 37 Posted September 1, 2015 Author Share Posted September 1, 2015 I find both JMichael's Script and Indelible's KM commands did not work. However, Indelible set my mind to thinking and this is how I've got it to work for me (thanks Indelible!). Required: Keyboard Maestro: I'm currently on v6 Select ‘Copy Note Link’ in the Menu ‘Note’ in EvernoteType the Tab KeystrokeType the Tab KeystrokePause for 1 SecondsType the ⌘V KeystrokeType the ⇧⌘Left Arrow KeystrokeType the ⌘X Keystroke What the actions do: Copies the selected note link (only works if one note is selected)The tabs move you into the actual noteThe link is pasted into the top of the note (as it's pasted into evernote it's pasted with a local evernote link rather than at http... link)The pasted link is selectedThe pasted link is cut The link is now on your clipboard and can be copied into any app that takes links. The only downside is that since the link has been pasted and cut from your note, your note's modified date is altered to today. Link to comment
Look 1 Posted September 2, 2015 Share Posted September 2, 2015 I ran this script tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get note link of aNote)end ifend tell And received this error: "Evernote got an error: Can’t make link of note id \"x-coredata://6770D54B-DE1D-4268-8765-FA83B2C7E3DC/ENNote/p2360\" of notebook \"Outlines\" into type specifier." number -1700 from link of note id "x-coredata://6770D54B-DE1D-4268-8765-FA83B2C7E3DC/ENNote/p2360" of notebook "Outlines" to specifiertry wrap "note link" in parentheses, it should work. tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get (note link) of aNote)end ifend tell Link to comment
bpwhistler 12 Posted September 2, 2015 Share Posted September 2, 2015 I ran this script tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get note link of aNote)end ifend tell And received this error: "Evernote got an error: Can’t make link of note id \"x-coredata://6770D54B-DE1D-4268-8765-FA83B2C7E3DC/ENNote/p2360\" of notebook \"Outlines\" into type specifier." number -1700 from link of note id "x-coredata://6770D54B-DE1D-4268-8765-FA83B2C7E3DC/ENNote/p2360" of notebook "Outlines" to specifiertry wrap "note link" in parentheses, it should work. tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get (note link) of aNote)end ifend tell This did work. I copied the classic link to the clipboard. Very simple and fast. Thanks. I'm not versed enough to debug at this point. Is there a way to make the note title the the link using AppleScript? Link to comment
Look 1 Posted September 2, 2015 Share Posted September 2, 2015 Yes.Use the script from DanielB, again wrap "note link" in parentheses.tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get title of aNote) & return & (get (note link) of aNote)end ifend tell Or download JMichael's script, which stores note title with link in RTF. Just replace "note link" with "(note link)" in the script. Link to comment
bpwhistler 12 Posted September 2, 2015 Share Posted September 2, 2015 Yes.Use the script from DanielB, again wrap "note link" in parentheses.tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get title of aNote) & return & (get (note link) of aNote)end ifend tell Or download Michael's script, which stores note title with link in RTF. Just replace "note link" with "(note link)" in the script.Yes...I had seen that in the above posts and had tried it. The results are the name of the note AND an Evernote link. i.e.:Copy Evernote Note Link (Classic) Scriptevernote:///view/2147483647/s486/b6f08aa8-d37a-449c-ae79-9949b42bcd58/b6f08aa8-d37a-449c-ae79-9949b42bcd58/ Versus what you're 'supposed' to get with the JMichael script where the name of the note is a clickable link. The problem with the JMichael script is it doesn't work for me. And I'm not smart enough to debug it! I'm also trying to debug the macro that patnpm shared with me a few posts up...but would prefer the speed of the script. Link to comment
bpwhistler 12 Posted September 2, 2015 Share Posted September 2, 2015 Actually...I just got the JMichael script to work for me! I put the (note link) in parentheses like you (Look) have been emphasizing and it led to the script running! Thanks Link to comment
bpwhistler 12 Posted September 2, 2015 Share Posted September 2, 2015 Thanks patnpm...I'm not an AppleScript kind of guy. If the JMichael script hadn't started working, I would have eventually gotten the steps from your macro to work. I like the instantaneous result of the script. The complexity of your macro has opened my eyes to other KM opportunities. Thanks Link to comment
monkeygrip 3 Posted October 7, 2015 Share Posted October 7, 2015 this is awesome. not good at scripting and help would be appreciated, how could i get this into a markdown link? thanks in advance [note title](note link) using: tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset the clipboard to (get title of aNote) & return & (get (note link) of aNote)end ifend tell Link to comment
Look 1 Posted October 7, 2015 Share Posted October 7, 2015 tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _sel set the clipboard to "[" & (get title of aNote) & ]" & "(" & (get (note link) of aNote) & ")"end ifend tell Link to comment
patnpm 30 Posted October 8, 2015 Share Posted October 8, 2015 Just as an aside if anyone is still having trouble with classic links; I have been recently using the web version of Evernote on a work computer and it is now surprisingly robust. The copy note function in particular will provide you with the classic link and it is all set up to very easily edit the text of the link. It's worth a look. Link to comment
bpwhistler 12 Posted October 17, 2015 Share Posted October 17, 2015 I was running the script (shown below) by JMichael successfully tell application "Evernote" set _sel to selection -- Gets the Note(s) Selected in Evernoteif _sel ≠ {} thenset aNote to first item of _sel -- Get ONLY the 1st Noteset noteTitle to (get title of aNote)set noteLink to (get (note link) of aNote)my copyLinkToClipboardAsRTF(noteLink, noteTitle) end ifend tell --=====================================-- SUBPROGRAMS--===================================== on copyLinkToClipboardAsRTF(pURL, plinkText) (*------------------------------------------------------------------------------PURPOSE: Creates click-able HTML Link and Copies to Clipboard as RTFA normal user paste should work into most, if not all, apps that support RTF DATE: Sat, Jul 19, 2014 VER: 1.0 COMMENTS:• Can't use the AppleScript "set the clipboard to" command because it will just copy the link as plain text• I don't understand the data in the "set cmd to" line, but it seems to work• The HTML version of this is: <a href="url">Link text</a>REF: • soboks post on MacScripter.net forum, 2008-07-24http://macscripter.net/viewtopic.php?pid=102416#p102416-------------------------------------------------------------------------------*) set cmd to "\"{\\rtf1\\ansi\\ansicpg1252\\cocoartf949\\cocoasubrtf270{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica;}{\\colortbl;\\red255\\green255\\blue255;}\\margl1440\\margr1440\\vieww9000\\viewh8400\\viewkind0\\pard\\tx720\\tx1440\\tx2160\\tx2880\\tx3600\\tx4320\\tx5040\\tx5760\\tx6480\\tx7200\\tx7920\\tx8640\\ql\\qnatural\\pardirnatural{\\field{\\*\\fldinst{HYPERLINK \"" & pURL & "\"}}{\\fldrslt\\f0\\fs24 \\cf0 \"" & plinkText & "\"}}}\"" do shell script "/bin/bash -c 'echo " & cmd & " | pbcopy -Prefer rtf'" return end copyLinkToClipboardAsRTF I'm now getting the error code below... Error Number: 2 /bin/bash: -c: line 0: syntax error near unexpected token `('/bin/bash: -c: line 0: `echo "{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf270{\fonttbl\f0\fswiss\fcharset0 Helvetica;}{\colortbl;\red255\green255\blue255;}\margl1440\margr1440\vieww9000\viewh8400\viewkind0\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural{\field{\*\fldinst{HYPERLINK "evernote:///view/2147483647/s486/b6f08aa8-d37a-449c-ae79-9949b42bcd58/b6f08aa8-d37a-449c-ae79-9949b42bcd58/"}}{\fldrslt\f0\fs24 \cf0 "Copy Evernote Note Link (Classic) Script"}}}" | pbcopy -Prefer rtf' The only change I've made that I can put a finger on is upgrading to El Capitan. Any ideas on what's happening? Link to comment
Look 1 Posted October 17, 2015 Share Posted October 17, 2015 It seems like the parenthesis in note title "Copy Evernote Note Link (Classic) Script" caused this error. Remove parenthesis should fix it. I'm not familiar with rich text format, I'll see if I can find a workaround. Link to comment
Look 1 Posted October 17, 2015 Share Posted October 17, 2015 tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset noteTitle to (get title of aNote)set noteLink to (get (note link) of aNote) set htmlLink to "<a href=" & noteLink & "\">" & noteTitle & "</a>"end ifdo shell script "echo " & quoted form of htmlLink & "|textutil -inputencoding UTF-8 -format html -convert rtf -stdin -stdout|LC_CTYPE=UTF-8 pbcopy" end tell Link to comment
Look 1 Posted November 12, 2015 Share Posted November 12, 2015 Just realized that I made a stupid mistake in the above script. set htmlLink to "<a href=" & noteLink & "\">" & noteTitle & "</a>" should be:set htmlLink to "<a href=" & noteLink & ">" & noteTitle & "</a>"No idea how the extra \" got there. updated script=========== tell application "Evernote"set _sel to selectionif _sel ≠ {} thenset aNote to first item of _selset noteTitle to (get title of aNote)set noteLink to (get (note link) of aNote)set htmlLink to "<a href=" & noteLink & ">" & noteTitle & "</a>"end ifdo shell script "echo " & quoted form of htmlLink & "|textutil -inputencoding UTF-8 -format html -convert rtf -stdin -stdout|LC_CTYPE=UTF-8 pbcopy"end tell Link to comment
bpwhistler 12 Posted November 13, 2015 Share Posted November 13, 2015 Thanks @Look! That worked perfectly in my initial testing. And I can actually understand the coding (marginally at least). You're awesome!! Link to comment
bpwhistler 12 Posted November 13, 2015 Share Posted November 13, 2015 Now all we need is something similar for iOS! Link to comment
udouble 1 Posted December 2, 2015 Share Posted December 2, 2015 Would you kindly explain this, step by step? Which program do I have to open (automator or scripteditor)? What do i have to do then? copy something into what? Record or play or...?Etcetera. I would love to have the classic link by default - AND the note title as well. Many thanks. New to scripts - obviously:-). Link to comment
bpwhistler 12 Posted December 3, 2015 Share Posted December 3, 2015 @udouble...if you are working in Evernote natively, there is already Classic Link functionality. For the scripts to be useful (fast) you need a program like Keyboard Maestro, otherwise it's just as fast and more convenient to use the built in Evernote Classic Link function. If you're interested in getting something like KM to launch your scripts...I'll walk you through it. Link to comment
Level 5* JMichaelTX 4,117 Posted December 3, 2015 Level 5* Share Posted December 3, 2015 Would you kindly explain this, step by step? Which program do I have to open (automator or scripteditor)? @udouble, I have a deal for you. I'll provide details instructions in return for your feedback about those instructions.Deal? I'll assume yes. See How to Install AppleScripts or JXA ScriptsPlease let me know if this helps, or how you would improve it. Actually, I'd love feedback from anyone who view/uses the above article. Best Regards,JMichael Link to comment
bpwhistler 12 Posted December 19, 2015 Share Posted December 19, 2015 @JMichael I took a look at your instructions. Excellent. Had I not already known how to do this...your in depth and well articulated description would have easily walked me through it. Link to comment
JJHo 0 Posted February 1, 2016 Share Posted February 1, 2016 @JMichaelTX:Thanks for you detail instruction (How to Install AppleScripts or JXA Scripts). I never use apple script before but this note wake me through the setup process smoothly! Great job of using EN public note, btw. There is only one glitch: in El Captain I can not save the plain text AS file... The work around is quite simple, just copy your script into a new AS document and recompile can solve the saving problem. I found the reason in this post ------------------------------------------------------------------------------------------------------------------------------------ To summarize: here is my steps to setup the "EN copy classic note link" from nothing: Read how to install Apple scrip from note: How to Install AppleScripts or JXA Scripts Pull the apple scrip from JMichaelTX’s repo on gist Download Satimage osax 3.7.0 (build 389) from this site Work around the El Captain AS saving problem by copy the script to new script and recompile it (Ref post) ------------------------------------------------------------------------------------------------------------------------------------ Link to comment
Level 5* JMichaelTX 4,117 Posted February 4, 2016 Level 5* Share Posted February 4, 2016 On 2/1/2016 at 11:30 AM, JJHo said: Thanks for you detail instruction (How to Install AppleScripts or JXA Scripts). I never use apple script before but this note wake me through the setup process smoothly! Great job of using EN public note, btw. Thanks for the feedback. If you have any suggestions for improvement, please let me know. On 2/1/2016 at 11:30 AM, JJHo said: There is only one glitch: in El Captain I can not save the plain text AS file... The work around is quite simple, just copy your script into a new AS document and recompile can solve the saving problem. I found the reason in this post Thanks for sharing this issue, and its resolution. I am still on Yosemite, so this must be a change with El Capitan. I'll update the install instructions accordingly. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.