Stickies
« Hyperlinks not copyable / usable »

Welcome Guest. Please Login or Register.
Feb 23rd, 2018, 3:54pm


Click for the

Zhorn Software Web Site

Search Knowledge Base:

Search:
  All terms Any terms  

« Previous Topic | Next Topic »
Pages: 1 2 3 4 5  Notify Send Topic Print
 veryhotthread  Author  Topic: Hyperlinks not copyable / usable  (Read 1147 times)
Cynthia
Cardinal Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 604
xx Re: Hyperlinks not copyable / usable
« Reply #45 on: Jan 31st, 2018, 12:33pm »

My favorite pastime is running wild and crazy troubleshooting trials for Stickies, but my OS is Win7pro. The option "copy link address" already works pretty well - after a fashion - without the new build on my 7pro computer, whereas it is missing almost always from Win 10 (according to eef and LadyLike).

Using the build, here's the RTF containing several links; one takes you to a Code Project article about hyperlinks (not to say that would be of any interest to you).

Quote:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}}

{\colortbl ;\red0\green0\blue0;\red0\green0\blue255;\red0\green102\blue204;}

{\*\generator Msftedit 5.41.21.2512;}\viewkind4\uc1\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480
\tx7200\tx7920\tx8640\tx9360\tx10080\tx10800\tx11520\tx12240\tx12960\tx13680\tx14400\tx15120\tx15840
\tx16560\tx17280\tx18000\tx18720\tx19440\tx20160\tx20880\tx21600\tx22320\tx23040\cf1\f0\fs24{\field{\*\fldinst{HYPERLINK "https://www.washingtonpost.com" }}{\fldrslt{\cf3\ul WaPo}}}\cf1\ulnone\f0\fs24\par

\par

{\field{\*\fldinst{HYPERLINK "https://www.codeproject.com/Articles/9196/Links-with-arbitrary-text-in-a-RichTextBox" }}{\fldrslt{\cf3\ul Code Project Article}}}\cf1\ulnone\f0\fs24\par

\par

{\field{\*\fldinst{HYPERLINK "https://www.needtoimpeach.com" }}{\fldrslt{\cf3\ul The "president"}}}\cf1\ulnone\f0\fs24\par

}


OK, I'm guessing that clicking on the link in the RTF should open Washington Post when it's working correctly. The right quotation mark is included as part of the link. Uh, that's not correct, right? Is that a clue that the code isn't pulling the right part of the link from the encoded RTF? Of course, I don't know jackshite about the lovely code under the hood of Stickies, but the moments when you share code are very special indeed.

A few notes while using the new build on my 7pro:
1. As long as attention is somewhere on the sticky, the tooltip always shows the web address as I glide the mouse over the hyperlink.
2. As long as attention is somewhere on the sticky, the option to copy the link's address shows up no matter where along the hyperlink I point and right-click. This is a dramatic improvement over what I had before.
3. When I click the option "copy link address", the insert link dialogue comes up with -
Name
WaPo
Address
https://www.washingtonpost.com
I don't know why I got a different result for the name when I tried this earlier (as I reported in my previous post). [Edit: Before I must have clicked on the copy link address menu item twice in succession; that would explain the name I got before.]

Next experiment?

Cynthia
« Last Edit: Jan 31st, 2018, 1:21pm by Cynthia » User IP Logged

Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3602
xx Re: Hyperlinks not copyable / usable
« Reply #46 on: Jan 31st, 2018, 3:12pm »

@LadyLike - if you download the same file again earlier in this thread, I've added the "edit" as a second menu item now. "Copy" should work better, and I can play with the edit functionality more, before deciding whether it works well enough to be released.

@Cynthia - thanks for your RTF. I loaded it here, and sure enough everything worked correctly. Opening the "edit hyperlink" dialog showed the correct title and link for each of the friendly name URLs, as it has been doing here throughout my testing. However, I'm just one machine...

Clicking on the "copy link" menu item twice in succession sounds like the kind of thing which might cause that trouble - at least potentially. Is that something you're able to reproduce please?

The code I use is mostly cobbled together hack, but if you like to see it, then here's the bit I wrote which extracts the friendly name as well as the URL itself. Note, "tom" isn't me, but "text object model":


// Get the URL
CString url = _T("");
GetTextRange(m_linkRange.cpMin, m_linkRange.cpMax, url);

// Get necessary interfaces
IRichEditOle* ole;
::SendMessage(m_hWnd, EM_GETOLEINTERFACE, 0, (LPARAM)&ole);
ITextDocument* doc;
ole->QueryInterface(__uuidof(ITextDocument), (void**)&doc);

// Get range of URL
ITextRange* range;
// select URL
doc->Range(m_linkRange.cpMin, m_linkRange.cpMax, &range);
// grow to include the friendly name
range->Expand(tomLink, NULL);

long fullLinkEnd;
range->GetEnd(&fullLinkEnd);

CString friendlyName;
// lose the quotes and space
GetTextRange(m_linkRange.cpMax + 2, fullLinkEnd, friendlyName);


Tom
User IP Logged

Cynthia
Cardinal Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 604
xx Re: Hyperlinks not copyable / usable
« Reply #47 on: Jan 31st, 2018, 3:48pm »

We appreciate your mostly cobbled together hack. smiley

I could not reproduce the weird title for the WaPo link by quickly double clicking the copy link address menu item. I can easily reproduce it, but not by quickly double clicking the menu item.

Right-click the WaPo link and choose "copy link address". When the insert link dialogue appears, choose OK. Then the link name changes to WaPoWaPo. Then right-click the newly named link to see the name changed to
WaPoHYPERLINK "https://www.washingtonpost.com" WaPo
It was a little mistake I made. And while the newly named hyperlink still works, the friendly name is now wrong inside of the insert link dialogue; perhaps that's due to the cobbled together nature of your hack? But who is going to do that - insert one link right next to another - and not notice? No big deal, right.

Cynthia
« Last Edit: Jan 31st, 2018, 4:07pm by Cynthia » User IP Logged

LadyLike
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 31
xx Re: Hyperlinks not copyable / usable
« Reply #48 on: Jan 31st, 2018, 6:19pm »

Tom.
I downloaded the exe and replaced stickies.exe with this build.
I now do have the 'Copy Link Address' in the menu. It keeps working.
But strangely enough, it sometimes deactivates other links from having this functionality. I can get it back after first highlighting the link. This should not be necessary but well, it's doable for now.
I recognize the 'disappearing' as what I described in an early reply: it's as if the link gets 'used up'. A strange thing.

I really like that code, I will look into it since I love coding (HTML/PHP/CSS) so it may pique my interest to do more.

In the mean time: this is usable. It works on this Win10 laptop. Everything still works fine on the Win7 workstation. I am afraid to download the new build to it though cheesy
User IP Logged

Cynthia
Cardinal Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 604
xx Re: Hyperlinks not copyable / usable
« Reply #49 on: Feb 1st, 2018, 10:54am »

You repaired the right-click option to copy the link address AND you included the option to edit. That newest build with the option to edit hyperlinks works great. Everything works better. I cannot think of a single improvement.

Other people have asked for the option to edit hyperlinks, user RadRussianRus for example.

Thank you, Tom!

Cynthia
User IP Logged

eef
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 53
xx Re: Hyperlinks not copyable / usable
« Reply #50 on: Feb 1st, 2018, 2:10pm »

The link detection is now rock solid ! The only problem i have is that the tooltip only dissapears if i move over it, otherwise it sticks around till i leave the sticky window . ( win10 pro )

Greetings,
User IP Logged

LadyLike
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 31
xx Re: Hyperlinks not copyable / usable
« Reply #51 on: Feb 1st, 2018, 2:17pm »

I tested it in full now too.

The link selection works fine.
The copy link always works. Edit hyperlink also works.

What I do notice on my laptop and what's different from what happens on the Win7 workstation, is the following:

Windows7
I right-click on a link.
In the menu I see 'Copy Link Address'.
I change my mind.
I right-click on a different link.
The 'Copy link address' item is present in the menu.

Windows 10
I right-click on a link.
In the menu I see 'Copy Link Address'.
I change my mind.
I right-click on a different link.
The 'Copy link address' item is *NOT* present in the menu.
I then click on the link.
I right-click on that link.
The 'Copy Link Address' item is now present in the menu.

Could this have to do with the problems that were causing the strange behaviour?
And... the cursor is still pretty jittery.


But all is getting much better grin
User IP Logged

Cynthia
Cardinal Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 604
xx Re: Hyperlinks not copyable / usable
« Reply #52 on: Feb 1st, 2018, 2:41pm »

And here's what happens on my system:

Windows7 pro
1. I right-click on a link.
2. In the menu I see 'Copy Link Address'.
3. I change my mind.
4. I right-click on a link different from the one in step 1.
5. The 'Copy link address' item is *NOT* present in the menu.
6. I then click anywhere else on the sticky (the title bar will do).
7. I right-click on a link different from step 1.
8. In the menu I now see 'Copy Link Address'.

Note: If I omit steps 4 & 5, there is no problem.

Cynthia
User IP Logged

Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3602
xx Re: Hyperlinks not copyable / usable
« Reply #53 on: Feb 1st, 2018, 2:43pm »

The problems come from the way I'm interacting with the richedit control, and also probably the different versions of that control which are running on W7 and W10. It's a built-in part of Windows, and you can probably understand understand why I'd choose to make use of something already provided for me by MS, rather than trying to code a rich text edit control from scratch.

However, it does mean I'm at the whim of any differences between the versions which there are. My code runs the same whether it's started on W7 or W10, so if the behaviour is different, then that's not down to me, right?

Also, if some code is working OK under W10, then I'm more inclined to leave it in. W10 is the future, and although I appreciate that many people do still use W7, that's the march of progress. Copying friendly link addresses isn't an essential part of note taking software.

However, I can reproduce what you're seeing here, Cynthia, on a W7 VM. Perhaps I can try to work out why it's different, and if nothing else just put a check for W7 into Stickies, and have it act differently under that OS. Sigh, annoying. But thanks for the help in testing everyone.

Tom
User IP Logged

Cynthia
Cardinal Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 604
xx Re: Hyperlinks not copyable / usable
« Reply #54 on: Feb 1st, 2018, 2:52pm »

"Copying friendly link addresses isn't an essential part of note taking software." Absolutely.

When the right-click menu box is hanging there after clicking a link, who wouldn't click somewhere else BEFORE right-clicking a different link. In fact, the right-click menu box actually completely covers some of my other links. So it makes sense to first click somewhere else to make the menu box go away before clicking on another link. LadyLike, I think I understand the way you would prefer it to work, but your preference doesn't make much sense to me.
User Image

There are a host of little things in Windows and MS software that take a certain approach. It's just the way it is. And as you point out, it isn't necessarily going to work the same on all Windows computers.

Tom, the way it works now is fine imo!

Don't do anything more imo, and stop sighing in annoyance. smiley

Thanks for all of these great fixes and new functions.

Cynthia
« Last Edit: Feb 1st, 2018, 3:46pm by Cynthia » User IP Logged

Cynthia
Cardinal Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 604
xx Re: Hyperlinks not copyable / usable
« Reply #55 on: Feb 1st, 2018, 6:17pm »

Sorry, eef. I didn't see your post until now. Assuming that attention is on the sticky: On your Win10, you're saying that the tooltip shows up when you point at a link address, but it vanishes as you move over the link? Is that what you're reporting?

Using the newest build on my 7pro, the tooltip consistently shows up as I glide the mouse over the link. I already reported on this for an earlier build in a different post.

Cynthia
User IP Logged

eef
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 53
xx Re: Hyperlinks not copyable / usable
« Reply #56 on: Feb 2nd, 2018, 06:09am »

It is the opposite , the tooltip stays visible if you move away from the link.The only way to make it disappear is to move over the tooltip itself (not the link) or leave the sticky window.

I would prefer to have a timeout if there is no other easy solution because even if you do not use the copy link option when you move over a link it sticks....

This problem can be only on my win10 system , there are more strange things with programs but i spend many months getting rid of annoying options and settings ( the solutions involving using GPedit are so cumbersome) that i loath to clean install win10 again!

If you are on win7 try to stay there as long as possible!




User IP Logged

LadyLike
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 31
xx Re: Hyperlinks not copyable / usable
« Reply #57 on: Feb 2nd, 2018, 07:54am »

Hi all.
I tested it again with the Windows10 laptop.

The tooltip works just fine here. It faithfully changes as I hover over a different link. It is jittery which has been the case since the beginning after installing Stickes and I mentioned this when I reported this issue.

But I DO have the 'Copy link address' option back in the menu. And this is what matters to me the most: I have to send people the plain link instead of the hyperlinked name of the page.

Right-clicking and 'chaning my mind'
I clearly work differently than you, Cynthia, as all people are different. So please bear with me smiley

Since the pop-up is narrow enough to not cover too much I can easily see the other link I want to right-click.
As explained, I used to be able to right-click on another link which would deactivate the active pop-up and immediately beccome active for the newly right-clicked link, including 'Copy link address'.
This is no longer the case. Instead, after right-clicking again, I get a pop-up without 'Copy link address'.

This seems wrong to me which is why I mention it. It may be interesting and helpful to find a solution, if, that is, Tom has enough hair left after pulling out so many.

I am happy to have the 'Copy link address' functionality back! This is a huge help!!!

User IP Logged

Cynthia
Cardinal Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 604
xx Re: Hyperlinks not copyable / usable
« Reply #58 on: Feb 2nd, 2018, 09:48am »

eef, I am sorry for your Win10 issues. Ugh! The behavior of the tooltips for Stickies links are pretty strange indeed. Have you noticed any oozing slime coming out of the cracks of your computer? It could be that your machine is from the Upside Down in Stranger Things (ref. Netflix). Until someone else reports similar behavior, I agree with your assessment; it's all about YOUR Win10. Thanks, I'll take your advice and hang onto my Win7 for as long as possible. smiley

LadyLike, if Tom continues to tweak the code and is successful getting hyperlinks working exactly the way you had it before, I probably won't even notice.

I'll be sure to try out any new builds you provide us with, Tom. It appears that I'm the only one who "is good" with the last build. One out of 3 - not bad. I'm kidding! eef's system is an outlier ... we hope.

Have I gushed over Stickies lately? I haven't. Stickies is sooo great! And you're always making it greater - thanks!

Cynthia
User IP Logged

LadyLike
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 31
xx Re: Hyperlinks not copyable / usable
« Reply #59 on: Feb 3rd, 2018, 11:53am »

@Eef
I don't have a sticky tooltip here on Windows 10. Thankfully! I use plain stickies out of the box, no fancy stuff going on.

@Cynthia
It is okay if you don't notice since you are not on the same OS. Not noticing would probably be a good thing.

In any case: we all have our own way to work and gave it much thought, I assume, to be efficient and fast while we work. This is why it's annoying when something causes a bug. I want to thank Tom for digging into this and solving the 'Copy link address' issue that was present in Windows 10. I do not have any problems with Stickies on Windows 7 as explained, but have both systems and even Windows 8 on yet another machine, as well as older horses running XP for development purpuses. But I won't test on all grin
User IP Logged

Pages: 1 2 3 4 5  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls