Jump to content

My embedded Internet Explorer does not respond to my actions


Marcdk
 Share

Recommended Posts

Hey guys

I ran into a problem with my script. I have a Gui wYith an embedded Internet Explorer window in i. My problem is, that when i open it, and tries to go down using the tab button, it just doesn't work. However if i click at the buttom of the sidebar scroller, the arrow, to go down, the page gets focused, and i can use tabs as i normally do.

This is an automated script, so i don't really want to take the mouse over there and press that page down arrow all the time. Also because it wouldn't work if i move the Gui. (the cords of the mousemove wouldn't match the button)

Any ideas? I tried to use the winactivate command, but it doesn't help either..

This is just one of my functions, after this code, i'm trying to tab through the page, but i can't.

Some of my code:

Func Begin2()
_IENavigate($PanTask, "https://signup.live.com/signup.aspx?ru=http%3a%2f%2fmail.live.com%2f%3frru%3dinbox&wa=wsignin1.0&rpsnv=10&ct=1233348459&rver=5.5.4177.0&wp=MBI&wreply=http:%2F%2Fmail.live.com%2Fdefault.aspx%3Fn%3D375073802&id=64855&bk=1233348460&rollrs=12&lic=1", 0)
Sleep (5000)
$oForm = _IEFormGetCollection ($Pantask, 0)
$oQuery = _IEGetObjById($Pantask, "iPwd"); 2nd Param = Name/ID
_IEFormElementSetValue ($oQuery, "roflmao")
winactivate (GuiCtrlRead($Pantask))

I hope anyone can help me with this issue, i would really appreciate that!

Thanks :)

Link to comment
Share on other sites

Something like the HTML DOM .scrollTo() Method:

$oIE.document.parentwindow.scrollto($x, $y)

I seem to remember Dale posting something that would go to the bottom every time, but I don't remember where. The .scrollTop and .scrollBottom methods don't seem to be in IE.

Also, .scrollBy():

#include <IE.au3>

$oIE = _IECreate("http://www.autoitscript.com", 1)
$hWND = _IEPropertyGet($oIE, "hwnd")
WinMove($hWND, "", -1, -1, 400, 400)
$oIE.document.parentwindow.scrollBy(500, 500)

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Something like the HTML DOM .scrollTo() Method:

$oIE.document.parentwindow.scrollto($x, $y)

I seem to remember Dale posting something that would go to the bottom every time, but I don't remember where. The .scrollTop and .scrollBottom methods don't seem to be in IE.

Also, .scrollBy():

#include <IE.au3>

$oIE = _IECreate("http://www.autoitscript.com", 1)
$hWND = _IEPropertyGet($oIE, "hwnd")
WinMove($hWND, "", -1, -1, 400, 400)
$oIE.document.parentwindow.scrollBy(500, 500)

:)

Thanks, this solution could work out for me also. Very nice, thanks for the support :lmao:
Link to comment
Share on other sites

.ScrollIntoView()

Interesting. I noticed while googling examples of usage that .scrollIntoView is done when focus is given to the element. So this works two ways:
#include <IE.au3>

$oIE = _IECreate("http://www.autoitscript.com", 1)
$hWND = _IEPropertyGet($oIE, "hwnd")
WinMove($hWND, "", 100, 100, 400, 400)
$colLinks = _IELinkGetCollection($oIE)
For $oLink In $colLinks
    If StringInStr($oLink.href, "#top") Then
        ; _IEAction($oLink, "focus")
        $oLink.scrollIntoView
        ExitLoop
    EndIf
Next

Either $oLink.scrollIntoView, or _IEAction($oLink, "focus") scrolls the window to it.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...