qwert Posted August 4, 2016 Posted August 4, 2016 (edited) 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 August 5, 2016 by qwert
l3ill Posted August 5, 2016 Posted August 5, 2016 (edited) Hi, Here is a command line URL validator https://github.com/srackham/w3c-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! Bill Edited August 5, 2016 by l3ill My Contributions... Reveal hidden contents SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
qwert Posted August 5, 2016 Author Posted August 5, 2016 @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.
l3ill Posted August 6, 2016 Posted August 6, 2016 (edited) 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 August 6, 2016 by l3ill My Contributions... Reveal hidden contents SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now