记住最后那部分发送模拟按键的,根据你的需要自己修改可以了,其他功能都OK了 | | | @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") | | | | 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}" | | COPY |
|