Jump to content

Error: The requested action with this object has failed. Problems with IE.


Recommended Posts

I have two simple script that get the active Internet Explorer window and changes the url. The scripts are identical except for the links that they redirect IE to. The problem that I have is that when I have IE in full-screen mode and alternate webpages with the two scripts more than 3 times I get this error "Error: The requested action with this object has failed". I would like the scripts to continue functioning without errors no matter how many times they are used.

Script # 1

#include <IE.au3>
#AutoIt3Wrapper_run_debug_mode=Y

Local $title = WinGetTitle ("[CLASS:IEFrame]")
Local $trimTitle = StringTrimRight($title, 20)
Local $oIE = _IEAttach($trimTitle)

_IENavigate($oIE, "https://www.google.com/maps/d/viewer?mid=1itdKt_5_qG_pIxM5N49qNK55rkM&ll=43.84185846009771%2C-91.24873084573369&z=9")
_IELoadWait($oIE)

Exit

Script # 2

#include <IE.au3>
#AutoIt3Wrapper_run_debug_mode=Y

Local $title = WinGetTitle ("[CLASS:IEFrame]")
Local $trimTitle = StringTrimRight($title, 20)
Local $oIE = _IEAttach($trimTitle)

_IENavigate($oIE, "http://www.explorelacrosse.com/")
_IELoadWait($oIE)

Exit

 

IE_Navigate_Map.au3

IE_Navigate_Web.au3

Link to comment
Share on other sites

Originally I didn't, but I just did and still I'm not receiving an error. Can you run this in full screen and let me know if you get it?

#include "IE_Navigate_Web.au3"
#include "IE_Navigate_Map.au3"

HotKeySet("{END}", "alternate")

Func alternate()
    For $i = 0 to 6 Step + 1
        Sleep(200)
        IE_Navigate_Web()
        Sleep(300)
        IE_Navigate_Map()
        Sleep(200)
    Next
    Exit
EndFunc

while 1
WEnd

I just modified your script slightly to be put into functions, but I'll reupload them here for you.

IE_Navigate_Map.au3

IE_Navigate_Web.au3

EDIT: Also, what is your AutoIt version and OS?

Edited by anthonyjr2

UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=

Link to comment
Share on other sites

3 minutes ago, jisevereid said:

I'm currently using AutoIt v3.3.14.2 and I'm on Windows 10. Also I ran your script and I was able to alternate the webpages once and then on the second time I got this error $oObject.navigate($sUrl)
$oObject^ ERROR

Woops I didn't copy the whole error code. Here it is . 

"C:\Program Files (x86)\AutoIt3\Include\IE.au3" (272) : ==> The requested action with this object has failed.:
$oObject.navigate($sUrl)
$oObject^ ERROR

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