Jump to content

move mouse to a particular piece of text on a webpage?


Go to solution Solved by DW1,

Recommended Posts

  • Solution

Sure, use _IEPropertyGet() like this:

#include <IE.au3>

Local $oIE = _IE_Example("basic")
Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
For $oLink In $oLinks
    MouseMove(_IEPropertyGet($oLink, "screenx") + (_IEPropertyGet($oLink, "width") / 2), _IEPropertyGet($oLink, "screeny") + (_IEPropertyGet($oLink, "height") / 2), 0)
    MsgBox(0, "Link Info", "Moved mouse to center of link with URL:" & @CRLF & $oLink.href)
Next
Link to comment
Share on other sites

IS it possible in Chrome? The web application I am using does not run correctly in IE.

I'm not sure.  There may be a plugin of some kind that opens a com object for chrome.  Search the forum for chrome automation.

Besides that, you could use pixels/image searching, but that's a bit sloppy compared to working directly with the browser.  IIRC there are some posts around here about Chrome automation.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...