We help IT Professionals succeed at work.

jscript, WHS,  WScript-how to detect if IE instance exists

mdolle
mdolle asked
on
378 Views
Last Modified: 2008-01-09
Hello Experts:
I have jscript code that uses WScript to create an instance of IE and navigates to a specific URL on the localhost:

objIE = WScript.CreateObject("InternetExplorer.Application);
objIE.Visible = 0;
objIE.Navigate("URL_ON_LOCALHOST");

I want to make it visible depending upon other conditions, but my big problem is that I don't want to create another one if objIE already exists

How can I detect if objIE already exists?  Also where can I find a list of properties, such as the Navigate and Visible?  I tried objIE.Exists, hoping, but that is not one of them.  All I find searching is VB examples.

Also I have tried if(objIE) {
.....
}
 but this just stops the script execution..  

This is jscript, on Windows XP.

Please help!!!!!
Thanks!
Myra
Comment
Watch Question

ZvonkoSystems architect
CERTIFIED EXPERT
Top Expert 2006
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
IT Expert
CERTIFIED EXPERT
Top Expert 2009
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.