AlienStar Posted May 11, 2019 Share Posted May 11, 2019 (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 May 11, 2019 by AlienStar Link to comment Share on other sites More sharing options...
Exit Posted May 11, 2019 Share Posted May 11, 2019 Show us your script App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
AlienStar Posted May 11, 2019 Author Share Posted May 11, 2019 (edited) 11 hours ago, Exit said: Show us your script here is expandcollapse popup#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 May 11, 2019 by AlienStar Link to comment Share on other sites More sharing options...
Exit Posted May 11, 2019 Share Posted May 11, 2019 Change ";_IEQuit($oIE)" to " _IEQuit($oIE)". Aka decomment it. Otherwise you have a lot of orphan objects consuming memory. AlienStar 1 App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
AlienStar Posted May 12, 2019 Author Share Posted May 12, 2019 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") Link to comment Share on other sites More sharing options...
Exit Posted May 12, 2019 Share Posted May 12, 2019 do not use processclose. Use_ iecreate only on the first time. Later use _ienavigate App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
AlienStar Posted May 12, 2019 Author Share Posted May 12, 2019 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 Link to comment Share on other sites More sharing options...
jdelaney Posted May 12, 2019 Share Posted May 12, 2019 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. AlienStar 1 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 More sharing options...
AlienStar Posted May 15, 2019 Author Share Posted May 15, 2019 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 Exit 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now