Jump to content

_IEQuit($oIE) - Do you want to kill user session forcefully?


Go to solution Solved by FireFox,

Recommended Posts

I randomly receive the following IE error in my scripts when I run _IEQuit($oIE) from the IE.au3 library:
 

Message from webpage
Do you want to kill user session forcefully?

Sometimes when I run my script, I get the error - sometimes I do not.  I haven't been able to consistently reproduce it.

Google doesn't seem to have any results for this either.

 

 

autoit_error.png

Here's the full code of one of my functions causing the problem:

Func run_distributor()
   Local $oIE = _IECreate("https://random.url")
   _IELoadWait($oIE)
   Local $form_username = _IEGetObjByName($oIE, "username")
   Local $form_password = _IEGetObjByName($oIE, "password")
   Local $form_button = _IEGetObjByName($oIE, "submitbtn")
   _IEPropertySet($form_username, 'innerText', 'user')
   _IEPropertySet($form_password, 'innerText', 'pass')
   _IEAction($form_button, 'click')
   _IELoadWait($oIE)
   Local $oFrame = _IEFrameGetObjByName($oIE, "mainframe")
   _IELoadWait($oFrame)
   Local $body_text = _IEBodyReadText($oFrame)
   _IEQuit($oIE)
   If StringInStr($body_text, "Success") > 0 Then
      Return True
   EndIf
      Return False
EndFunc 

I'm wondering if there's an easy way to avoid this - if there's something I'm doing wrong - or if I'll need to look for the message box and close it as a work around.

I'm thinking it might be an IE error, but there's no reference to it on the internet.  I didn't seem to have this problem about a month ago.  (Perhaps it's an update to IE8?)  It doesn't always seem to be caused by an oframe, etc.

Link to comment
Share on other sites

  • Solution

Hi,

Welcome to the autoit forum :)

This popup comes from the webpage itself and not internet explorer.

If you can send some javascript to the page (using IE functions), unbind the "beforeunload" event to avoid the popup.

Br, FireFox.

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