Jump to content

Internet explorer doesn't run well in _IECreate with loop


Recommended Posts

hello everybody 

In some random positions when I'm using _IEcreate with loop, internet explorer runs then close immediately without doing the required actions 

if the loop range $i=0 to 1000, maybe the script doing at most 950 action 

all what I need is to make internet explorer runs well and doing all actions in loop 

NOTE: this problem occurs whatever the action loop is.

please help me 

Edited by AlienStar
Link to comment
Share on other sites

11 hours ago, Exit said:

Show us your script

here is 

#include <IE.au3>
#include <array.au3>
#Include <File.au3>
#include <MsgBoxConstants.au3>
#include <InetConstants.au3>
;--------------------------------------------
$inifl = "data.ini"
$inifl_arr = IniReadSectionNames($inifl)
;--------------------------------------------
for $i = UBound($inifl_arr)-1 to 1 Step -1
   
   Local $file_0 =  IniReadSection($inifl,$i)
   Local $file = $file_0[1][1]
   Local $url = $file_0[2][1]
   ;--------------------------------------------
   Local $oIE =_IECreate($url)
   ;--------------------------------------------
   _IELoadWait($oIE)
   ;--------------------------------------------
   Local $title = _IEGetObjById($oIE, "title")
   Local $oText = _IEGetObjById($oIE, "content")
   Local $oSubmit = _IEGetObjById($oIE,"publish")
   ;--------------------------------------------
   Local $ttlcntnt = FileReadLine($file, 1)
   Local $content = FileRead($file)
   ;--------------------------------------------
   _IEFormElementSetValue($title, $ttlcntnt)
   _IEFormElementSetValue($oText, $content)
   ;--------------------------------------------
   _IEAction($oSubmit, "click")
   ;------------------------------------------------
   _IELoadWait($oIE)
   ;------------------------------------------------
   ;_IEQuit($oIE)
   ProcessClose("iexplore.exe")
   ;------------------------------------------------
Next

 

Edited by AlienStar
Link to comment
Share on other sites

When you close IE it does a bunch of stuff to "clean" itself up, which then makes new instances fail to create. Put error handling and retry loops around _iecreate.  our use _ienavigate.

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
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...