Re: How to make Internet Explorer window top most?

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 01/26/05


Date: Wed, 26 Jan 2005 10:30:05 +0100

Eugene Zelikovsky wrote:

> I have vb-script , which started applicatoin as "Internet Explorer" with
> parameters.
> How to place Internet Explorer on top(modal window).

You could set a title, and use AppActivate on it, an example here:
http://groups.google.co.uk/groups?selm=3EA302E5.5BAE90EB%40hydro.com

> Do
> Loop While MSIE.Busy

You should add an "WScript.Sleep 100 in this loop to avoid CPU hogging.

Also, ReadyState is reported to be far more reliable the Busy, so I
suggest you use this waiting loop instead:

Do Until MSIE.readyState = 4: wscript.sleep 100: Loop

In case people has used the search bar in IE in their previous logon
session, you should turn it off before opening IE, setting the
ShowBrowserBar property before you call the SetupMSIE sub, like the
code in this post:

http://groups.google.co.uk/groups?selm=40326016.D28ABB5B%40hydro.com

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx


Relevant Pages

  • Re: watch for a pop-up window
    ... The only part I'm stuck on is knowing when the window has popped up. ... Start by writing yourself a loop, ... While the popup has not yet appeared, appactivate will ...
    (microsoft.public.scripting.vbscript)
  • Re: Accesing check boxes and clicking buttons
    ... (how can you appactivate something that isn't there) ... window has not appeared as yet, and true when the window does ... The usual strategy is to go into a loop, ... I could use Java's Robot ...
    (microsoft.public.scripting.vbscript)
  • Re: Create ZIP File From Script
    ... When the other window runs the title bar says ... For a Sendkeys solution that supports this, you could use AutoItX ... instead (and it has much better AppActivate functions as well). ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: Loop to load webpage
    ... a reference an already open IE window. ... Dim objShell As Object, objShellWindows As Object, o As Object ... > ' Loop until the page is fully loaded ...
    (microsoft.public.excel.programming)
  • Re: Pass Worksheet Button Caption or Identifier to Sub
    ... Rightclick on the righthand window and choose "Show Hidden Members" ... You could loop through all the shapes on the worksheet. ... dim BTN as Button ... Sub ClickProc() ...
    (microsoft.public.excel.programming)