phenomenix Posted March 11, 2008 Report Share Posted March 11, 2008 I've used the method of moving the cursor around the screen and checking for the "If cursor equals Internet navigate" but this is way too slow when checking the entire screen. Does anyone know how to find the location of a hyperlink in a faster manner - more like the "get pixel color at X, Y" can do? That method is very fast, but I don't know how to detect a hyperlink that way - only color Thanks Roger Quote Link to comment Share on other sites More sharing options...
phenomenix Posted March 11, 2008 Author Report Share Posted March 11, 2008 Oh - I should mention that the hyperlinks I'm searching for are not text. They are images. Thanks Quote Link to comment Share on other sites More sharing options...
phenomenix Posted March 11, 2008 Author Report Share Posted March 11, 2008 I've tried tabbing to the image then "move mouse to cursor" but it just moves the mouse to the left of the screen. Thanks Quote Link to comment Share on other sites More sharing options...
stan Posted March 11, 2008 Report Share Posted March 11, 2008 Can you tab to the image and have the macro press Enter? Quote Link to comment Share on other sites More sharing options...
Cory Posted March 12, 2008 Report Share Posted March 12, 2008 An alternative to tabbing is to "View Source" in your browser and parse your hyperlinks from the HTML. But of course you need to understand a little about HTML to make this work for you but even if you don't understand HTML it's pretty easy to learn how to identify a hyperlink attached to a graphic. In fact if you give me a URL I'll show you exactly how. Quote Link to comment Share on other sites More sharing options...
phenomenix Posted March 12, 2008 Author Report Share Posted March 12, 2008 Well, I don't think the source code or the tab-enter trick will work. The problem is that I want to search a given area (or even the entire screen) on the screen and detect the pixel coordinates where the link starts and ends. I don't want to click on it - just detect its presence. When I find the link then I will move the mouse there and do a macro test to see if it's the link I'm looking for. Basically I'm looking to have the macro find the location on the screen of all the links on the page. Any other ideas? Quote Link to comment Share on other sites More sharing options...
Cory Posted March 12, 2008 Report Share Posted March 12, 2008 I think my solution will work for you, assuming it's normal HTML of course. If you look at the macro link link on this page of my web site in HTML you will see it looks like this: <a href="Multiple_Choice.mex"><img src="MEPlay.gif"></a> I took out some of the additional parameters for clarity but this still works. Now it's really easy for me to see that the link (href) will take me to Multiple_Choice.mex. Of course that's a relative link so normally it would look like a URL, EG, http://bluepointdesign.com/macros/multiple...iple_Choice.mex. Isn't this URL what you're extracting by hovering? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.