Jump to content

Mouse move + window scroll


 Share

Recommended Posts

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

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

Link to comment
Share on other sites

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
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...