Sign in to follow this  
Followers 0
peppe124

Mouse move + window scroll

7 posts in this topic

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

Share this post


Link to post
Share on other sites



please give the test page

Share this post


Link to post
Share on other sites

please give the test page

I'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

Share this post


Link to post
Share on other sites

can use ie "scrollamount" parameter

Share this post


Link to post
Share on other sites

can use ie "scrollamount" parameter

do yo mean clicks parameter on the mousemove command??

And above all, How do I get the new position after the scrolling?

Share this post


Link to post
Share on other sites

HKEY_CURRENT_USER\Control Panel\Desktop\WheelScrollLines

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Posted Imageuse HKEY_CURRENT_USER\Control Panel\Desktop\WheelScrollLines

multiply one line pixel high

I spell english very hard

in my tast

HKEY_USERS\.DEFAULT\Control Panel\Desktop WheelScrollLines

can change ie Scroll Line

Edited by lainline

Share this post


Link to post
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
Sign in to follow this  
Followers 0