[Upload Beta] try to create IE multiple times
This commit is contained in:
parent
f1fc32c74c
commit
f37195bc89
|
@ -16,15 +16,24 @@ IE.Quit
|
||||||
|
|
||||||
function CreateIeWindow ()
|
function CreateIeWindow ()
|
||||||
on error resume next
|
on error resume next
|
||||||
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
|
|
||||||
if IE is nothing then
|
Set CreateIeWindow = nothing
|
||||||
|
For count = 0 to 100
|
||||||
|
WScript.StdOut.WriteLine count & ": Trying to create InternetExplorer"
|
||||||
|
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
|
||||||
|
if not IE is nothing then
|
||||||
|
IE.Visible = True
|
||||||
|
|
||||||
|
WScript.StdOut.WriteLine IE.HWND
|
||||||
|
Set CreateIeWindow = IE
|
||||||
|
exit for
|
||||||
|
end if
|
||||||
|
WScript.Sleep 100
|
||||||
|
Next
|
||||||
|
if CreateIeWindow is nothing then
|
||||||
WScript.StdOut.WriteLine "Failed to create InternetExplorer.Application"
|
WScript.StdOut.WriteLine "Failed to create InternetExplorer.Application"
|
||||||
WScript.Quit
|
WScript.Quit
|
||||||
end if
|
end if
|
||||||
IE.Visible = True
|
|
||||||
|
|
||||||
WScript.StdOut.WriteLine IE.HWND
|
|
||||||
Set CreateIeWindow = IE
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Sub Wait(IE)
|
Sub Wait(IE)
|
||||||
|
|
Loading…
Reference in New Issue