Jump to content

Need method to test built hyperlink

Recommended Posts

I'm exploring HTML with AU3 for the first time.  The editor (reposted) in the examples forum has provided an excellent tool for my testing. (HTML Editor)

As shown by the below example, the editor makes it easy to create a hyperlink.  The problem I have is that there isn't a feature to test/confirm a link.  Right clicking on a link, for example, doesn't have an Open URL option.

Can anyone suggest a good way to implement a "Test URL" button on the editor?  (Ideally, the test feature will be able to accommodate the case where there are multiple hyperlinks in the HTML block, so maybe a right-click option would be better.)

Thanks in advance for any suggestions.


For reference, the html that results from building the link is:  <P><A href="http://www.duckduckgo.com">This is a test of a hyperlink.</A></P>


Edited by qwert
Link to post
Share on other sites


Here is a command line URL validator 


And you can easily add additional choices to your right click context menu (via the registry) that will run an autoit script in conjunction with the chosen data:

see PathFinder in my sig.

Good luck!


Edited by l3ill
Link to post
Share on other sites

@Bill: Thanks for your response

Indeed, the validation tools you point out would bring a ton of capabilities. And I can see the worth of being able to confirm the entire block of HTML. But for my immediate use, all I need is a feature or button that attempts to open the URL that the user’s cursor is in. (It’s also the case that I’m not permitted to alter the registry on the user’s PC.)

As I mentioned, HTML is new to me.  But I feel there must be a simple way to implement that one capability.

I have found an interesting HTML utility here.  I haven't isolated the mechanism, yet, but it has a feature to open a hyperlink by just clicking on it ... some I'm hopeful.

Again, thanks for responding.



Link to post
Share on other sites

If I understand correctly, you only want to type a hyperlink and then test if it actually is a hyperlink?

if so then this will do that:

#include <IE.au3>
$sHypLink = InputBox("Enter Hyperlink", "Enter Hyperlink")

Local $oIE = _IECreate($sHypLink)

You will either get a page loaded with your link or an error message.

Edited by l3ill
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...