peppe124 Posted February 3, 2010 Share Posted February 3, 2010 Hi everybody, I need to position the mouse on an object place in a webpage which is positioned outside the screen (I mean you need to scroll it to reach the element). So what I did it's try to scroll the page and calculate again the coordinates (using the Screenx /y properties) but it gives me the same coordinates again as if I didn't scroll at all. I'll post the code righ here: $scroll = False While $scroll = False $oFrame = _IEFrameGetObjByName($oIE, "mainIFrame") $oForm = _IEFormGetObjByName($oFrame1, "formEsito") ;recupero la collezione contennente le img $oInputs = _IETagNameGetCollection($oForm, "a") If (@error > 0) Then ConsoleWrite("ERRORE NEL RECUPERO delle img") EndIf For $oInput In $oInputs ;consoleWrite($oInput.src ) ;### Debug Console If (StringInStr($oInput.innerHTML, "Revoca Fidi")) Then $x = _IEPropertyGet($oInput, "screenx") $y = _IEPropertyGet($oInput, "screeny") $size = WinGetClientSize("[active]") consoleWrite($x & " - "& $y & " - " & $size[1] &@CRLF) If $y<$size[1] Then $scroll = True Else MouseWheel("down", 1) Sleep(500) EndIf EndIf Next WEnd Link to comment Share on other sites More sharing options...
lainline Posted February 3, 2010 Share Posted February 3, 2010 please give the test page Link to comment Share on other sites More sharing options...
peppe124 Posted February 3, 2010 Author Share Posted February 3, 2010 please give the test pageI'm afraid I can't....it's not a page I can post in public.But what I can say, it's that I need to click on this element, cause it opens a modal window.So in order to interact with it I need to activate the link with the mouse move.But since it's quite a long page, you find this element by scrolling. But I don't know how to get the new coordinates.Hope it's more clear now.Thank you Link to comment Share on other sites More sharing options...
lainline Posted February 3, 2010 Share Posted February 3, 2010 can use ie "scrollamount" parameter Link to comment Share on other sites More sharing options...
peppe124 Posted February 3, 2010 Author Share Posted February 3, 2010 can use ie "scrollamount" parameterdo yo mean clicks parameter on the mousemove command??And above all, How do I get the new position after the scrolling? Link to comment Share on other sites More sharing options...
lainline Posted February 3, 2010 Share Posted February 3, 2010 HKEY_CURRENT_USER\Control Panel\Desktop\WheelScrollLines Link to comment Share on other sites More sharing options...
lainline Posted February 3, 2010 Share Posted February 3, 2010 (edited) use HKEY_CURRENT_USER\Control Panel\Desktop\WheelScrollLines multiply one line pixel highI spell english very hard in my tast HKEY_USERS\.DEFAULT\Control Panel\Desktop WheelScrollLines can change ie Scroll Line Edited February 3, 2010 by lainline 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