I am building a WScript to open IE7 and open two tabs.
However, I want to wait until the first page opens, then enter username/password hit {enter}, wait for that page to open in the same tab, THEN open the second tab with the second page.
The error I get is "Expected ';'" on Line 3, Char 5. I don't see it.
I probably have errors further in the code as well. I am just using notepad for editing. I don't have a js editor.
Yes. I am new to code...well haven't touched it for 18 years. I am new to this site but use very frequently.
However, I want to wait until the first page opens, then enter username/password hit {enter}, wait for that page to open in the same tab, THEN open the second tab with the second page.
The error I get is "Expected ';'" on Line 3, Char 5. I don't see it.
I probably have errors further in the code as well. I am just using notepad for editing. I don't have a js editor.
Yes. I am new to code...well haven't touched it for 18 years. I am new to this site but use very frequently.
Code:
var navOpenInBackgroundTab = 0x1000;
var oIE = new ActiveXObject("InternetExplorer.Application");
Dim objShell
Set objShell = CreateObject("WScript.Shell")
oIE.Navigate2("[URL unfurl="true"]https://mail.google.com/a/mycompany.com/");[/URL]
oIE.Visible = true;
Do Until oIE.ReadyState = 4;
Wscript.Sleep 100;
Loop;
objShell.SendKeys "username";
objShell.SendKeys "{TAB}";
Wscript.Sleep 100;
objShell.SendKeys "password";
objShell.SendKeys "{ENTER}";
Do Until oIE.ReadyState = 4;
Wscript.Sleep 100;
Loop;
oIE.Navigate2("[URL unfurl="true"]https://calendar.google.com/a/mycompany.com/",[/URL] navOpenInBackgroundTab);