Jump to content
why?

How can make the Classic link the default way of linking?

Recommended Posts

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.

  • Like 2

Share this post


Link to post

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.

Share this post


Link to post

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 note

2. Copy llink

3. 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

  • Like 2

Share this post


Link to post

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 note

2. Copy llink

3. 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...

Share this post


Link to post

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?

Share this post


Link to post

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 selection
if _sel ≠ {} then
set aNote to first item of _sel
set the clipboard to (get note link of aNote)
end if
end tell
 
I've tried it and it works perfectly. Thankyou Mr Stone!
  • Like 1

Share this post


Link to post

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 selection

if _sel ≠ {} then

set aNote to first item of _sel

set the clipboard to (get title of aNote) & return & (get note link of aNote)

end if

end tell

Share this post


Link to post

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

————————————————————————————————————

Here is an example I pasted by hand (CMD-V) into Outlook 2011 Calendar item:

Copy%20EN%20Note%20Link%20-%20Example.gi

 

 

  • Like 2

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

I ran this script

 

tell application "Evernote"

set _sel to selection

if _sel ≠ {} then

set aNote to first item of _sel

set the clipboard to (get note link of aNote)

end if

end 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

Share this post


Link to post

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

B) 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

Share this post


Link to post

I must have done something very wrong patnpm...after using the KM macro on a note...this was the output:

 

eve150831213532

Share this post


Link to post

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 note

copy the link of the note

select the link text

⌘K

paste in the link of the note

close the link edit box

select the link

⌘K again 

insert a space after the evernote:\\\... link

select all

copy 

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

Share this post


Link to post

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 Evernote
Type the Tab Keystroke
Type the Tab Keystroke
Pause for 1 Seconds
Type the ⌘V Keystroke
Type the ⇧⌘Left Arrow Keystroke
Type 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 note
The 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 selected
The 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.

Share this post


Link to post

I ran this script

 

tell application "Evernote"

set _sel to selection

if _sel ≠ {} then

set aNote to first item of _sel

set the clipboard to (get note link of aNote)

end if

end 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

try wrap "note link" in parentheses, it should work.

 

tell application "Evernote"

set _sel to selection

if _sel ≠ {} then

set aNote to first item of _sel

set the clipboard to (get (note link) of aNote)

end if

end tell

Share this post


Link to post

 

I ran this script

 

tell application "Evernote"

set _sel to selection

if _sel ≠ {} then

set aNote to first item of _sel

set the clipboard to (get note link of aNote)

end if

end 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

try wrap "note link" in parentheses, it should work.

 

tell application "Evernote"

set _sel to selection

if _sel ≠ {} then

set aNote to first item of _sel

set the clipboard to (get (note link) of aNote)

end if

end 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?

Share this post


Link to post

Yes.

Use the script from DanielB, again wrap "note link" in parentheses.

tell application "Evernote"

set _sel to selection

if _sel ≠ {} then

set aNote to first item of _sel

set the clipboard to (get title of aNote) & return & (get (note link) of aNote)

end if

end tell

 

Or download JMichael's script, which stores note title with link in RTF. Just replace "note link" with "(note link)" in the script.

Share this post


Link to post

Yes.

Use the script from DanielB, again wrap "note link" in parentheses.

tell application "Evernote"

set _sel to selection

if _sel ≠ {} then

set aNote to first item of _sel

set the clipboard to (get title of aNote) & return & (get (note link) of aNote)

end if

end 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) Script

 
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.

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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 selection

if _sel ≠ {} then

set aNote to first item of _sel

set the clipboard to (get title of aNote) & return & (get (note link) of aNote)

end if

end tell

Share this post


Link to post

tell application "Evernote"


set _sel to selection


if _sel ≠ {} then


set aNote to first item of _sel


 


set the clipboard to "[" & (get title of aNote) & ]" & "(" & (get (note link) of aNote) & ")"


end if


end tell


Share this post


Link to post

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.

  • Like 1

Share this post


Link to post

I was running the script (shown below) by JMichael successfully

 

tell application "Evernote"

 

set _sel to selection -- Gets the Note(s) Selected in Evernote

if _sel ≠ {} then

set aNote to first item of _sel -- Get ONLY the 1st Note

set noteTitle to (get title of aNote)

set noteLink to (get (note link) of aNote)

my copyLinkToClipboardAsRTF(noteLink, noteTitle)

 

end if

end tell

 

--=====================================

-- SUBPROGRAMS

--=====================================

 

on copyLinkToClipboardAsRTF(pURL, plinkText)

 

 

(*

------------------------------------------------------------------------------

PURPOSE:  Creates click-able HTML Link and Copies to Clipboard as RTF

A 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-24

http://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?

Share this post


Link to post

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.

Share this post


Link to post

tell application "Evernote"

set _sel to selection

if _sel ≠ {} then

set aNote to first item of _sel

set noteTitle to (get title of aNote)

set noteLink to (get (note link) of aNote)

 

set htmlLink to "<a href=" & noteLink & "\">" & noteTitle & "</a>"

end if

do shell script "echo " & quoted form of htmlLink & "|textutil -inputencoding UTF-8 -format html -convert rtf -stdin -stdout|LC_CTYPE=UTF-8 pbcopy"

 

end tell

Share this post


Link to post

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 selection

if _sel ≠ {} then

set aNote to first item of _sel

set noteTitle to (get title of aNote)

set noteLink to (get (note link) of aNote)

set htmlLink to "<a href=" & noteLink & ">" & noteTitle & "</a>"

end if

do shell script "echo " & quoted form of htmlLink & "|textutil -inputencoding UTF-8 -format html -convert rtf -stdin -stdout|LC_CTYPE=UTF-8 pbcopy"

end tell

Share this post


Link to post

Thanks @Look!  That worked perfectly in my initial testing.  And I can actually understand the coding (marginally at least).  You're awesome!!

Share this post


Link to post

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:-). 

Share this post


Link to post

@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.

Share this post


Link to post

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 Scripts

Please 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

  • Like 1

Share this post


Link to post

@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.

  • Like 1

Share this post


Link to post

@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

 56af95a3cba4f_ScreenShot2016-02-01at11.2

 

------------------------------------------------------------------------------------------------------------------------------------

To summarize: here is my steps to setup the "EN copy classic note link" from nothing:

  1. Read how to install Apple scrip from note: How to Install AppleScripts or JXA Scripts
  2. Pull the apple scrip from JMichaelTX’s repo on gist
  3. Download Satimage osax 3.7.0 (build 389) from this site
  4. Work around the El Captain AS saving problem by copy the script to new script and recompile it (Ref post)
------------------------------------------------------------------------------------------------------------------------------------
 

 

Share this post


Link to post
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.

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...