我试图打开一个网站并填写一个表单,从“echo off”到“del%command%”工作正常,但是从第二个示例网站开始,它与填写表单无关!
@echo off
set command=C:\Users\%USERNAME%\Desktop\GMAIL.VBS
start https://www.example.com/sign-in
echo Set objShell = WScript.CreateObject("WScript.Shell") > %command%
echo Set WshShell = WScript.CreateObject("WScript.Shell") >> %command%
echo Do Until Success = True >> %command%
echo Success = objShell.AppActivate("Google Chrome") >> %command%
echo Loop >> %command%
echo WshShell.SendKeys "E-mail" >> %command%
echo WshShell.SendKeys "{TAB}" >> %command%
echo WshShell.SendKeys "Password" >> %command%
echo WshShell.SendKeys "{ENTER}" >> %command%
ping 192.0.2.2 -n 1 -w 5000 > nul
start %command%
ping 192.0.2.2 -n 1 -w 1000 > nul
del %command%
start https://www.example2.com/my-account/new-order/
echo WshShell.Sendkeys "Name"
echo WshShell.Sendkeys "{TAB}"
echo WshShell.Sendkeys "City"
echo WshShell.Sendkeys "{TAB}"
echo WshShell.Sendkeys "City"
exit