Guest yaojii Posted January 10, 2005 Share Posted January 10, 2005 Hello . I want to make my script work everyday at a exact time even when the computer is locked. I found a command may help us for this. AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]] AT [\\computername] time [/iNTERACTIVE] [ /EVERY:date[,...] | /NEXT:date[,...]] "command" \\computername Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted. id Is an identification number assigned to a scheduled command. /delete Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled. /yes Used with cancel all jobs command when no further confirmation is desired. time Specifies the time when command is to run. /interactive Allows the job to interact with the desktop of the user who is logged on at the time the job runs. /every:date[,...] Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed. /next:date[,...] Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed. "command" Is the Windows NT command, or batch program to be run. I write a small script ==================================== Run("notepad.exe") WinWait("Untitled - Notepad") ControlSend ( "Untitled - Notepad", "", "Edit1", "day is " &@YEAR &" " & @MON & " " & @MDAY ) ControlSend("Untitled - Notepad", "","","!f") ControlSend("Untitled - Notepad", "","","S") WinWait("Save As", "") sleep(1000) ControlFocus("Save As","","Edit1"); ControlSend("Save As","","Edit1","yaojiqing1.txt{ENTER}") sleep(1000) ControlSend("yaojiqing1.txt - Notepad", "","","!f") ControlSend("yaojiqing1.txt - Notepad", "","","x") WinWait("yaojiqing1.txt - Notepad") WinClose("yaojiqing1.txt - Notepad") ; Finished! Exit ==================================== Then compile it as c:\notepad1.exe. at time /interactive c:\notepad1.exe After doing this, at the "time" , notepad1.exe run. My question is 1: Is that only for controlXXX . Can I use mouseClick or some other command? 2: I am trying to controlsend c:\yaojiqing1.txt. But it always sends c;\yaojiqing1.txt. Why ? I cannot handle this. Thanks for help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now