Sign in to follow this  
Followers 0
StefanoVR

Help for a Beginner - Multiple IE doing some stuff

4 posts in this topic

#1 ·  Posted (edited)

Hello everybody, I' am a beginner so excuse me if my question is banal.

I need to speed up a process. I get data from a website ad I store in a excel file but the process is too slow (mainly because website is very slow)

I thought that the simplest way was to paralellize activity and open more session of the browser.

Is there a way to create an array of IE session and make these working simultaneously (calling the same functions)

I didn't find the way to declare it and start a loop for the different objects at the same moment.

Could you help me?

Thanks in advance.

Stefano

Edited by Mazzo

Share this post


Link to post
Share on other sites

Mazzo,

Sure, post what you've got so far.

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

I will try to explain.

Actually I'am working with one session of Internet Explorer ($oIE) with this simple loop that calls some functions that call other sub functions. Everything seems to work correctly. At each sub function are passed the objects as parameters and I attach to different browsers using HWID.

I read the different product code to find from an xls file that is produced by another software and I write some flag in it when is done,

Do
;Reads the start line
$nRigaInElaborazione = My_Trova_Prima_Riga_XLS_Utile($oExcel,"A","NO","NO","NO") ;find the product code
;Reads the different parameters that i need
$sCodiceProdottoProduttore = _ExcelReadCell($oExcel,$nRigaInElaborazione,2)
$nPrezzoSoglia = _ExcelReadCell($oExcel,$nRigaInElaborazione,3)
$nPrezzoAcquisto = _ExcelReadCell($oExcel,$nRigaInElaborazione,4)
$nPrezzoAttualmentePubblicatoDaFilemaker = _ExcelReadCell($oExcel,$nRigaInElaborazione,5)
;Calls the main sub-function that performs the elaborations that I need
My_Prezzo_Minimo ($oIE,$oExcel,$nRigaInElaborazione,$sCodiceProdottoProduttore,$nPrezzoSoglia)

Until $nRigaInElaborazione = "FINE"

What I would like to do.. is running multiple instances of internet explorer simultaneously to speed up the process and my problem is that I' can' t understand how to declare something like a collection of objects or an array of objects (is possible?) and start that loop at the same moment for differents session of IE.

First Starts $oIE1 (reads start line, for example 100, write the flag that that line is in use and performs elaborations). After a few moments starts $oIE2 (reads start line, 101, because 100 is worked by $oIE1 and writes the flag that that line is in use and performs elaborations)... and so on. Up to 3/4/5 sessions..

Could you help me?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Any suggestion ? Please.

Is quite important. I searched the forum but I' didn't find any clue.

Edited by Mazzo

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  
Followers 0