Good day to all. I'm new here, so I apologize if I do something wrong.
What I'm trying to do ... I'm trying to create a Bat file that would automatically open a specific site and enter there login and password, nadimal "Login" ... Emulation of what I attended today on this site ... In the past, I did it quite well ... Here is an example. (Login and password changed)
@set @script=0 /*
@echo off
set @script=
@cscript /nologo /e:jscript "%~dpnx0"
@exit /b
*/
var url,login,password;
url = "http://ift.tt/2q215fQ";
// заменить на свои учетные данные
login = "k";
password = "gx";
var IE = WScript.CreateObject("InternetExplorer.Application");
IE.visible = 1;
IE.navigate(url);
while (IE.Busy) {
WScript.Sleep(200);
}
IE.document.getElementsByName("user")(0).value = login;
IE.document.getElementsByName("password")(0).value = password;
button = IE.document.getElementsByName("save")(0);
button.focus();
button.click();
A little time has passed and the developers have made changes to the site ... For the moment, such an algorithm does not work for some reason
@set @script=0 /*
@echo off
set @script=
@cscript /nologo /e:jscript "%~dpnx0"
@exit /b
*/
var url,login,password;
url = "http://ift.tt/2pdNDCC";
// заменить на свои учетные данные
login = "k;
password = "6m";
var IE = WScript.CreateObject("InternetExplorer.Application");
//IE.visible = 0;
IE.navigate(url);
IE.visible = 1;
while (IE.Busy) {
WScript.Sleep(4000);
}
IE.document.getElementsByName("user")(0).value= login;
IE.document.getElementsByName("password")(0).value = password;
button = IE.document.getElementsByName("doaction")(0);
button.focus();
button.click();
For some reason, the login and password do not appear in the forms and the button is not pressed ... Help me please. Thank you.
Aucun commentaire:
Enregistrer un commentaire