Jump to content

_ClipPutHyperlink() does not work in Windows 10


Recommended Posts

Hi everyone,

_ClipPutHyperlink() is a function which allows it's user to convert a http link from a plain string (for example: https://www.autoitscript.com) into the html format and then put it to the clipboard so that the user can paste the link to some other programs like Microsoft Word...

I have been using this function in my autoit scripts for a few years and it works fine in Windows 7.

Recently I have upgraded my system to Windows 10, and this function does not work anymore.

I have checked the author's website (link) but he hasn't updated the script since 2010.

Please help me to make this function work in Windows 10, or find another way to achieve the same functionality.

Thank you very much.

Link to post
Share on other sites

Change the following line in _ClipPutHTML.au3...
Func _ClipBoard_SendHTML (Const ByRef $sHTMLData,Const ByRef $sPlainText)
so...
Func _ClipBoard_SendHTML (Const ByRef $sHTMLData, Const ByRef $sPlainText)
... and then test it again ... because it works for me under Windows 10.

Before and after the keyword Const must be a space!

_ClipPutHTML.au3

Edited by Bitnugger
Link to post
Share on other sites
15 minutes ago, Bitnugger said:

Change the following line in _ClipPutHTML.au3...
Func _ClipBoard_SendHTML (Const ByRef $ sHTMLData,Const ByRef $ sPlainText)
so...
Func _ClipBoard_SendHTML (Const ByRef $ sHTMLData, Const ByRef $ sPlainText)
... and then test it again ... because it works for me under Windows 10.

Thank you for your help. But I don't see any difference between the two lines, and when I copy-paste the second line into _ClipPutHTML.au3 and rebuild my script, I got an error because in the line you provided, there is a space between $ and sHTMLData, and another space between $ and sPlainText.

Link to post
Share on other sites

Hi all.

I have spent a whole night to debug and the problem is not related to AutoIt. It came from the fact that I forgot to set a hotkey in the target app (the app which I paste the html content into).

So if you are still interested, here is the details:

When I upgraded my system to Windows 10, I have to reinstall the above mentioned target app. There is a keyboard hotkey of the app that masks the hotkey I use in the AutoIt script, therefore in order for the autoit script to work, this hotkey must be reassigned. Obviously I had done this reassignment before, but just one time, and then I have not touched it again for years, that’s why I totally forgot about it. Even at times I upgraded this app to newer versions, because the app still reused this setting from the old versions, my autoit script still worked. It is when I installed a new version of Windows yesterday, this problem appeared again... and the rest of the story is like what I have described in this thread.

Thank you for your helps anyway. I love AutoIt and its active community!

Edited by bobbyab9987
Link to post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...