记住最后那部分发送模拟按键的,根据你的需要自己修改可以了,其他功能都OK了- @rem 保存我为 AutoWork.bat
- @echo off
- if not exist Work.vbs more +6 "%~f0">Work.vbs
- at 6:00 /interactive "Work.vbs"
- exit
-
- Dim wsh,strPath,fso
- Set fso = CreateObject("Scripting.FileSystemObject")
- Rem 下面是程序的路径
- strPath = "C:\Dos.exe"
- set wsh = CreateObject("WScript.Shell")
- fso.CreateFolder wsh.SpecialFolders("Desktop") & "\" _
- & DatePart("yyyy",Date) & "-" _
- & DatePart("m",Date) & "-" _
- & DatePart("d",Date)
- wsh.Run strPath
- WScript.Sleep 3000 '延时3秒
- wsh.SendKeys "test"
- WScript.Sleep 500
- wsh.SendKeys "{enter}"
- WScript.Sleep 500
- wsh.SendKeys "test"
- WScript.Sleep 500
- wsh.SendKeys "{enter}"
- Rem 重复用上面的步骤直到输入完你要输入的值
复制代码
|