Web Recorder - IE_Create array

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kh_kevin
Junior Coder
Posts: 34
Joined: Mon Nov 12, 2012 8:30 am

Web Recorder - IE_Create array

Post by kh_kevin » Mon Nov 19, 2012 10:09 am

Hello,

Is it possible to use arrays w/IE_Create? I tried:

Code: Select all

IE_Create>0,IE[%i%]
and

Code: Select all

Let>i=1
ArrayDim>ies,5
...
IE_Create>0,ies_%i%
but I couldn't seem to get it to work.

edit: Oh yeah, my requirement is that I'll have to open 15 windows of the same site to pull a report from. Filenames will be based on the which one is the current one. Currently if the reports are run in serial it takes over 20 minutes. Thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Nov 19, 2012 4:55 pm

IE_Create returns a handle to the browser window. So you want to put these values into your array:

Code: Select all

//initialise 
Let>num_browsers=0

.. later .. to make a new instance:

//increase the size of my array
Let>num_browsers=num_browsers+1
ArrayDim>myIEs,num_browsers
IE_Create>0,ieRes
Let>myIEs_%num_browsers%=ieRes
You now have an array called myIEs where each element is a reference to one of your browser windows.

Code: Select all

//navigate the first:
IE_Navigate>myIES_1,http://www.google.com,res

//navigate all in a loop:
Let>k=0
Repeat>k
  Let>k=k+1
  Let>this_browser=myIEs_%k%
  IE_Navigate>this_browser,http://www.mjtnet.com,ieres
Until>k=num_browsers
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

kh_kevin
Junior Coder
Posts: 34
Joined: Mon Nov 12, 2012 8:30 am

Post by kh_kevin » Tue Nov 20, 2012 1:24 am

Got it working, thanks!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts