var args = WScript.arguments;
var followme="[url]http://www.google.com/[/url]";
if(args.length>0)
{
followme+=args(0);
}
ie.Navigate("[url]https://www.google.com/accounts/Login?continue=[/url]"+followme);
SynchronizeIE();
var doc=ie.document;
doc.forms[0].Email.value="[email]lixianmin@gmail.com[/email]";
doc.forms[0].Passwd.value="密码写在这里";
//这是因为PersistentCookie这个checkbox有时候有而有时候没有。
if(doc.forms[0].PersistentCookie!=null)
{
doc.forms[0].PersistentCookie.checked=false;
}
doc.forms[0].submit();
SynchronizeIE();
ie.Visible=true;
function SynchronizeIE()
{
while(ie.Busy)
{
WScript.Sleep(100);
}
}
假定把该文件保存为googleSpecific.js,存放在%windir%\system32路径下,并建立如下内容的一个google.bat文件同样放在%windir%\system32路径下。