1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
@echo off & mode 42,10 2>nul tasklist /fi "windowtitle eq Batch-SendKeys*" | find /i "PID" && exit if not "%username%"=="XXX" exit echo. echo 双击脚本开始,关闭窗口停止 echo 数据保存在打开的文本窗口中 echo 默认跳过第一行"包裹运单号" echo 每次键入间隔大于 1000毫秒 echo 每200条提示提交,暂停15秒 echo 学习交流之用,擅用后果自负 echo. echo By ZhangZsky 2021/1/5 title Batch-SendKeys 卫辉营业部@JD echo set shell = WScript.CreateObject^("WScript.Shell"^) >SendKeys.vbs echo shell.SendKeys Wscript.Arguments^(0^) >>SendKeys.vbs echo shell.SendKeys "{ENTER}" >>SendKeys.vbs echo WScript.Sleep 1000 >>SendKeys.vbs setlocal enabledelayedexpansion set /p =<nul >data.txt start data.txt call :sound "此工具为XX快递,XX营业部,专用" >nul pause call :sound "本条语音结束前,请点击所需要输入的位置,任务现在开始" cls set /a num=0 set /a sum=0 for /f "skip=1 tokens=1" %%a in ( data.txt ) do ( set /a num=!num!+1 set /a sum=!sum!+1 call SendKeys.vbs %%a echo 本次第!num!条,合计键入!sum!条! Rem title 合计键入!sum!条!SendKeys if !num!==200 ( call :sound "乙到达单次上限100条,请提交。倒计时15秒" ping 127.1 -n 15 >nul call :sound "开始继续键入任务" set /a num=0 ) ) call :sound "本次测试任务共键入!sum!条,现乙完毕,欢迎反馈所遇问题。再见" del /q SendKeys.vbs,data.txt exit :sound mshta vbscript:createobject("sapi.spvoice").speak(%1)(window.close) |
发表回复