Jump to content
Sign in to follow this  

IE.au3 compatibility problem with IE 11

Recommended Posts

Just wondering if anyone encountered compatibility problem between IE.au3 and IE 11 before? I have a script runs fine with IE 11.0.9600.17914, but can't run properly on another computer with Win 10 installed (also IE 11 but with a new version number).

Is chrome.au3 mature enough to replace IE.au3?

Share this post

Link to post
Share on other sites

@JLogan3o13 Here you go: 

; open a new window and go to $sUrl
    $oIE = _IECreate($sUrl)
    $hIE = _IEPropertyGet($oIE, "hwnd")
    WinWaitActive($hIE, "", 5)
    WinMove($hIE, "", $x, $y, $width, $height)

    ; navigate to $sUrl1
    _IENavigate($oIE, $sUrl1); <-- @error = 9 after this call

    ; search for the user's username
    $oObj = _IEGetObjByName($oIE,"s")
    _IEPropertySet($oObj,"innertext",$userName); <-- Initially found the $userName was never input in the search box
    $oObj = _IEGetObjById($oIE,"search-submit")

You are right, it may not be a compatibility problem. I made an assumption there. This script works on one setup but not another. The only thing seems to be different and relevant (for me) is the version numbers of the two internet explorers. Basically it should go to a link, and then go to the second link, on which there is a search box that allows me to search a user on the site.

For the one failed, the browser appears to get to the second link successfully, but it stops there and the $userName was never entered in the search box. So I back traced it a bit found that @error was set to 9 after the _IENavigate() call, which is defined in doc as: 9 ($_IEStatus_ClientDisconnected) - Client Disconnected.

Any clues from this code?

Share this post

Link to post
Share on other sites

Okay, I think I fixed it after I noticed the failed computer seems to be faster than the one it doesn't fail:

  1. Added a delay (i.e. Sleep($delayFactor)) before and after any calls made to IE.au3 functions
  2. Added a MsgBox(0, "", "Stop before _IENavigate()!", 1) before any _IENavigate() calls

For the 2nd point, I can't use Sleep(1000) to replace the MsgBox() call to fix it. 

I know, it's weird, but it seems to work here.:sweating:

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  

  • Create New...