Jump to content
Sign in to follow this  
PaulStanton

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

Recommended Posts

PaulStanton

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.

Share this post


Link to post
Share on other sites
FireFox

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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
FireFox

Have you solved your problem ?

If yes, I would appreciate you to post the solution :)

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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  

×