IE window close after script is done 
Author Message
 IE window close after script is done

Hi,

I want to have the IE window closed after the script is finished.
Nor the "Set IE = Nothing" nor the "WScript.Quit" would do it.

Set IE = CreateObject("InternetExplorer.Application")
For LoopCtr = 0 to x
  IE.navigate " http://www.*-*-*.com/ "
  IE.visible=1
  Some stuff here
Next

Set IE = Nothing
WScript.Quit



Sun, 01 Sep 2002 03:00:00 GMT  
 IE window close after script is done

.Visible = 0

Do while objIE.Busy
  ' wait for page to load
Loop

objIE.visible=0
WScript.Quit

Chow,

Marcus

  Hi,

  I want to have the IE window closed after the script is finished.
  Nor the "Set IE = Nothing" nor the "WScript.Quit" would do it.

  Set IE = CreateObject("InternetExplorer.Application")
  For LoopCtr = 0 to x
    IE.navigate "http://MyServer.Lambda.be"
    IE.visible=1
    Some stuff here
  Next

  Set IE = Nothing
  WScript.Quit



Sun, 01 Sep 2002 03:00:00 GMT  
 IE window close after script is done

I didn't think about a .quit. Any insights into why .visible=0 removes all instances from memory? If you do an Ctrl-Alt-Del it's auto-magically gone! Though maybe not forgotten :-)

Marcus

  ie.quit

  Regards,
  Ian
  Senior Consultant | MSDN Regional Director
  ADV E-Commerce | Windows Script FAQ
  Advantage Group | http://www.windows-script.com


    Hi,

    I want to have the IE window closed after the script is finished.
    Nor the "Set IE = Nothing" nor the "WScript.Quit" would do it.

    Set IE = CreateObject("InternetExplorer.Application")
    For LoopCtr = 0 to x
      IE.navigate "http://MyServer.Lambda.be"
      IE.visible=1
      Some stuff here
    Next

    Set IE = Nothing
    WScript.Quit



Sun, 01 Sep 2002 03:00:00 GMT  
 IE window close after script is done

ie.quit

Regards,
Ian
Senior Consultant | MSDN Regional Director
ADV E-Commerce | Windows Script FAQ
Advantage Group | http://www.windows-script.com


  Hi,

  I want to have the IE window closed after the script is finished.
  Nor the "Set IE = Nothing" nor the "WScript.Quit" would do it.

  Set IE = CreateObject("InternetExplorer.Application")
  For LoopCtr = 0 to x
    IE.navigate "http://MyServer.Lambda.be"
    IE.visible=1
    Some stuff here
  Next

  Set IE = Nothing
  WScript.Quit



Mon, 02 Sep 2002 03:00:00 GMT  
 IE window close after script is done

I don't know if IE or WScript does the work, but if you have no references to an instance of IE, and that instance doesn't have a visible UI, how do you get rid of it? (Yes, I know the task window or process viewers are capable) It's just to prevent a thousand hidden copies of IE from running in the background. It may also have something to do with security.

Eric K.

  I didn't think about a .quit. Any insights into why .visible=0 removes all instances from memory? If you do an Ctrl-Alt-Del it's auto-magically gone! Though maybe not forgotten :-)

  Marcus

    ie.quit

    Regards,
    Ian
    Senior Consultant | MSDN Regional Director
    ADV E-Commerce | Windows Script FAQ
    Advantage Group | http://www.windows-script.com


      Hi,

      I want to have the IE window closed after the script is finished.
      Nor the "Set IE = Nothing" nor the "WScript.Quit" would do it.

      Set IE = CreateObject("InternetExplorer.Application")
      For LoopCtr = 0 to x
        IE.navigate "http://MyServer.Lambda.be"
        IE.visible=1
        Some stuff here
      Next

      Set IE = Nothing
      WScript.Quit



Mon, 02 Sep 2002 03:00:00 GMT  
 IE window close after script is done

Thanks to all.

Ian,
Where can I find the .quit ?
I *DID* lookup MSDN for relevant IE methods before posting, found a lot but not the .quit. Any pointer ? I installed MSDN January from DVD, selected all (ouch 1.3 GB). I guess I missed something.

Thanks
Raymond Warichet

  ie.quit



Mon, 02 Sep 2002 03:00:00 GMT  
 IE window close after script is done

InternetExplorer Object
http://msdn.microsoft.com/workshop/browser/WebBrowser/reference/Objec...

<tip>
donttrytypingthaturlbyhandbecauseyoullprobablymakelotsofmistakesandgetapagenotfounderrorandgetreallyfrustratedand...
</tip>
--
Michael Harris
MVP Scripting

Thanks to all.

Ian,
Where can I find the .quit ?
I *DID* lookup MSDN for relevant IE methods before posting, found a lot but not the .quit. Any pointer ? I installed MSDN January from DVD, selected all (ouch 1.3 GB). I guess I missed something.

Thanks
Raymond Warichet

  ie.quit



Mon, 02 Sep 2002 03:00:00 GMT  
 IE window close after script is done

I used the OLE/COM viewer to find the methods.
It comes with VID or you can download it free from
http://www.microsoft.com/com/resources/oleview.asp

Regards,
Ian
Senior Consultant       | MSDN Regional Director
ADV E-Commerce    | Windows Script FAQ
Advantage Group       | http://www.windows-script.com

  Thanks to all.

  Ian,
  Where can I find the .quit ?
  I *DID* lookup MSDN for relevant IE methods before posting, found a lot but not the .quit. Any pointer ? I installed MSDN January from DVD, selected all (ouch 1.3 GB). I guess I missed something.

  Thanks
  Raymond Warichet

    ie.quit



Tue, 03 Sep 2002 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Close IE 5 without prompt for close window confirmation

2. windows open and close problem between IE 4.0 and IE 5.0/5.5

3. onkeypress - what am i doing wrong

4. newbie - what am I doing wrong?

5. What am I doing wrong?

6. What I am doing wrong.

7. Am i doing right?

8. Am I doing right?

9. Am I doing this right?

10. exitserver and settransfer, what am I doing wrong?

11. What am I doing wrong here?

12. What am i doing wrong here????? HELP

 

 
Powered by phpBB® Forum Software