Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)
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
Posted
8 hours ago, Exit said:

Change ";_IEQuit($oIE)" to " _IEQuit($oIE)".  Aka decomment it. Otherwise you have a lot of orphan objects consuming memory.

thanks my friend but if I close internet explorer process each loop, is it right ?

ProcessClose("iexplore.exe")

 

Posted
3 minutes ago, Exit said:

do not use processclose.

Use_ iecreate only on the first time.

Later use _ienavigate

I've used _ienavigate before but it caused high memory usage for iexplorer.exe 

Posted
On 5/12/2019 at 2:24 AM, Exit said:

Change ";_IEQuit($oIE)" to " _IEQuit($oIE)".  Aka decomment it. Otherwise you have a lot of orphan objects consuming memory.

I think it's fixed by this way :) thanks so much 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...