From f37195bc89e2b22895e8f7634d6475b9b772e9cf Mon Sep 17 00:00:00 2001 From: zilmar Date: Tue, 29 Sep 2015 14:32:39 +1000 Subject: [PATCH] [Upload Beta] try to create IE multiple times --- Source/Script/upload_beta.vbs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Source/Script/upload_beta.vbs b/Source/Script/upload_beta.vbs index a3b41593f..3119b449d 100644 --- a/Source/Script/upload_beta.vbs +++ b/Source/Script/upload_beta.vbs @@ -16,15 +16,24 @@ IE.Quit function CreateIeWindow () 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.Quit end if - IE.Visible = True - - WScript.StdOut.WriteLine IE.HWND - Set CreateIeWindow = IE End Function Sub Wait(IE)