Sorry for my english, i'm french speaking.
This code below work fine but when the IE windows is opened and We click on the "X" (close button, upper right) we receive an error message. If We click "cancel" there is no problem because we trap this. How can we trap the "X" for quiting the program ? If we add the "On error resume" we don't have no more this error but the program is looping. Thanks for your help !
Set objExplorer = WScript.CreateObject _
("InternetExplorer.Application", "IE_")
objExplorer.Navigate "file://D:\Deploiement_EE\deploiement_EE.html"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 400
objExplorer.Height = 250
objExplorer.Visible = 1
Do While (objExplorer.Document.Body.All.OKClicked.Value = "")
Wscript.Sleep 250
Loop
strComputer = objExplorer.Document.Body.All.OKClicked.Value
objExplorer.Quit
Wscript.Sleep 250
If strComputer = "Cancelled" Then
Wscript.Quit
End If
This code below work fine but when the IE windows is opened and We click on the "X" (close button, upper right) we receive an error message. If We click "cancel" there is no problem because we trap this. How can we trap the "X" for quiting the program ? If we add the "On error resume" we don't have no more this error but the program is looping. Thanks for your help !
Set objExplorer = WScript.CreateObject _
("InternetExplorer.Application", "IE_")
objExplorer.Navigate "file://D:\Deploiement_EE\deploiement_EE.html"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 400
objExplorer.Height = 250
objExplorer.Visible = 1
Do While (objExplorer.Document.Body.All.OKClicked.Value = "")
Wscript.Sleep 250
Loop
strComputer = objExplorer.Document.Body.All.OKClicked.Value
objExplorer.Quit
Wscript.Sleep 250
If strComputer = "Cancelled" Then
Wscript.Quit
End If