Hi, I am trying to writing a script but have some difficulties when implementing it in the windows task scheduler. Therefore, I would like to seek your advise. The script works like this: It will luanch a URL through IE, in which some texts will be entered automatically into the webpage, then a buttom in the webpage will be clicked to kick-start some program. I finished the script and it runs just fine. Then, when I tried to schedule this script to run every night through the Windows task scheduler, it failed. I believe the reason might be that the windows was locked when the script was kicked start and the send-key portion of the script failed to work as intended. Would you guys help me out pls? Thank you very much! Regards, Michael
Do you run this under the current user account? If not there is no GUI, so SendKeys will not have any succes. Also do you schedule your script under cscript? i.e.: commandline cscript abc.vbs? "michael lam" wrote: > Hi, > > I am trying to writing a script but have some difficulties when implementing > it in the windows task scheduler. Therefore, I would like to seek your > advise. > > The script works like this: It will luanch a URL through IE, in which some > texts will be entered automatically into the webpage, then a buttom in the > webpage will be clicked to kick-start some program. > > I finished the script and it runs just fine. Then, when I tried to schedule > this script to run every night through the Windows task scheduler, it > failed. > > I believe the reason might be that the windows was locked when the script > was kicked start and the send-key portion of the script failed to work as > intended. > > Would you guys help me out pls? > > Thank you very much! > > Regards, > Michael > > >