DavidTunnell Posted September 9, 2013 Share Posted September 9, 2013 Is it possible to move the mouse cursor to hover over a particular work that is on a webpage? I don't want to use coordinates because I am creating a script that multiple people will use with various resoultions / number of monitors. Link to comment Share on other sites More sharing options...
Solution DW1 Posted September 9, 2013 Solution Share Posted September 9, 2013 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 DavidTunnell 1 AutoIt3 Online Help Link to comment Share on other sites More sharing options...
DavidTunnell Posted September 9, 2013 Author Share Posted September 9, 2013 IS it possible in Chrome? The web application I am using does not run correctly in IE. Link to comment Share on other sites More sharing options...
DW1 Posted September 9, 2013 Share Posted September 9, 2013 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. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
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