HuaAi Posted July 20, 2015 Share Posted July 20, 2015 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? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 20, 2015 Moderators Share Posted July 20, 2015 "compatibility problem" is just a tiny bit vague. How about posting your code so we can see what you're doing? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
HuaAi Posted July 20, 2015 Author Share Posted July 20, 2015 @JLogan3o13 Here you go: ; open a new window and go to $sUrl $oIE = _IECreate($sUrl) $hIE = _IEPropertyGet($oIE, "hwnd") WinActivate($hIE) 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") _IEAction($oObj,"click") _IELoadWait($oIE)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? Link to comment Share on other sites More sharing options...
HuaAi Posted July 20, 2015 Author Share Posted July 20, 2015 Okay, I think I fixed it after I noticed the failed computer seems to be faster than the one it doesn't fail:Added a delay (i.e. Sleep($delayFactor)) before and after any calls made to IE.au3 functionsAdded a MsgBox(0, "", "Stop before _IENavigate()!", 1) before any _IENavigate() callsFor 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. 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