• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Scripting tabs

W

Walter Briscoe

Flightless Bird
I have a web access application which takes about 16 elapsed hours to do
about 10k lookups.
I want to speed it. At the lowest level, there is an array of up to 11
items, of which some need to access the web.
My driving data is Excel, I script in VBA, I use Set IE = CreateObject("
InternetExplorer.Application") to create a single instance of IE8 which
I drive with many calls of IE.Navigate2. I believe that most time is
spent in Do Until Not IE.busy And IE.ReadyState = 4: DoEvents: Loop.
My first optimisation thought was to have an array of 11 instances of
IE8, fire up to 11 IE.Navigate2 calls and wait for each to finish. This
should allow up to 11 waits in parallel. This seems to overload my
machine. My next thought was to use 11 tabs in a single instance of IE8.
I have Const navOpenInNewTab = 2048 and can use IE.Navigate2 URL1,
navOpenInNewTab to open URL1 in a new tab. There seems to be no
programmatic method to switch between tabs or to reuse a tab.

<http://msdn.microsoft.com/en-us/library/aa752093%28VS.85%29.aspx>
intriguingly says "When navOpenInNewWindow or navOpenInNewTab is
specified, the caller does not receive a reference to the WebBrowser
object for the new window, so there is no immediate way to manipulate
it."

Can someone suggest a non-immediate way?

PS: I might have asked this in an MSDN forum. I don't know how to use
them or select an appropriate one. This may not be the most appropriate
newsgroup; microsoft.public.internetexplorer.scripting seems defunct.

PS2: IE8 sometimes ties itself in knots, downloading images which do not
interest me. I already use
RegistryCreateValue HKCU, "Software\Microsoft\Internet Explorer\Main", _
"Display Inline Images", "no"
RegistryCreateValue HKCU, "Software\Microsoft\Internet Explorer\Main", _
"Expand Alt Text", "yes"
to eliminate image download and see image alternative text.
--
Walter Briscoe
 
P

PA Bear [MS MVP]

Flightless Bird
MSDN IE Development Forum (post such questions here instead)
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads
--
~Robear Dyer (PA Bear)
MS MVP-IE, Mail, Security, Windows Client - since 2002

Walter Briscoe wrote:
> I have a web access application which takes about 16 elapsed hours to do
> about 10k lookups.
> I want to speed it. At the lowest level, there is an array of up to 11
> items, of which some need to access the web.
> My driving data is Excel, I script in VBA, I use Set IE = CreateObject("
> InternetExplorer.Application") to create a single instance of IE8 which
> I drive with many calls of IE.Navigate2. I believe that most time is
> spent in Do Until Not IE.busy And IE.ReadyState = 4: DoEvents: Loop.
> My first optimisation thought was to have an array of 11 instances of
> IE8, fire up to 11 IE.Navigate2 calls and wait for each to finish. This
> should allow up to 11 waits in parallel. This seems to overload my
> machine. My next thought was to use 11 tabs in a single instance of IE8.
> I have Const navOpenInNewTab = 2048 and can use IE.Navigate2 URL1,
> navOpenInNewTab to open URL1 in a new tab. There seems to be no
> programmatic method to switch between tabs or to reuse a tab.
>
> <http://msdn.microsoft.com/en-us/library/aa752093%28VS.85%29.aspx>
> intriguingly says "When navOpenInNewWindow or navOpenInNewTab is
> specified, the caller does not receive a reference to the WebBrowser
> object for the new window, so there is no immediate way to manipulate
> it."
>
> Can someone suggest a non-immediate way?
>
> PS: I might have asked this in an MSDN forum. I don't know how to use
> them or select an appropriate one. This may not be the most appropriate
> newsgroup; microsoft.public.internetexplorer.scripting seems defunct.
>
> PS2: IE8 sometimes ties itself in knots, downloading images which do not
> interest me. I already use
> RegistryCreateValue HKCU, "Software\Microsoft\Internet Explorer\Main", _
> "Display Inline Images", "no"
> RegistryCreateValue HKCU, "Software\Microsoft\Internet Explorer\Main", _
> "Expand Alt Text", "yes"
> to eliminate image download and see image alternative text.
 
W

Walter Briscoe

Flightless Bird
In message <un8uaQQpKHA.5588@TK2MSFTNGP02.phx.gbl> of Wed, 3 Feb 2010
14:06:46 in microsoft.public.internetexplorer.general, "PA Bear [MS
MVP]" <PABearMVP@gmail.com> writes
>MSDN IE Development Forum (post such questions here instead)
>http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads


Thank you for your advice. I followed the link given. I used search to
confirm my question had not already been answered. I clicked "Ask a
question" and was routed to a "Sign in and get started!" page. I
followed the link. I tried to sign up using my real email address. I was
told it was reserved without that concept being explained. I rebooted
and tried again. I was told my email address was already registered. I
tried again and my username/password combination was rejected. I tried
resetting my password and was told "The Windows Live ID is incorrect.
Please try again.". I gave up. I shall try to live without that Forum.
--
Walter Briscoe
 
R

rob^_^

Flightless Bird
Hi Walter,

You require a LiveID to ask questions in those forums. You cannot use your
comcast etc email address.

Try a web search instead using the keywords spider vbscript ie

To speed things up you will need to get rid of all the GUI (Excel and the IE
chrome). You will find plenty of examples using the spider keyword.

Immediately you can speed up your scripts by setting your IE objects
visibility to false and minimizing your Excel server app to the system tray.

Regards.

"Walter Briscoe" <wbriscoe@nospam.demon.co.uk> wrote in message
news:6pMPJBBgyraLFwzO@freenetname.co.uk...
> In message <un8uaQQpKHA.5588@TK2MSFTNGP02.phx.gbl> of Wed, 3 Feb 2010
> 14:06:46 in microsoft.public.internetexplorer.general, "PA Bear [MS
> MVP]" <PABearMVP@gmail.com> writes
>>MSDN IE Development Forum (post such questions here instead)
>>http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads

>
> Thank you for your advice. I followed the link given. I used search to
> confirm my question had not already been answered. I clicked "Ask a
> question" and was routed to a "Sign in and get started!" page. I
> followed the link. I tried to sign up using my real email address. I was
> told it was reserved without that concept being explained. I rebooted
> and tried again. I was told my email address was already registered. I
> tried again and my username/password combination was rejected. I tried
> resetting my password and was told "The Windows Live ID is incorrect.
> Please try again.". I gave up. I shall try to live without that Forum.
> --
> Walter Briscoe
 
Top