以下代码功能,实现的是,使用批处理代码,实现QQ的自动登陆。
@echo off
>>%tmp%\QQLOG.vbs echo dim program
>>%tmp%\QQLOG.vbs echo program="QQ程序的路径"
>>%tmp%\QQLOG.vbs echo rem
>>%tmp%\QQLOG.vbs echo set Wshell=CreateObject("Wscript.Shell")
>>%tmp%\QQLOG.vbs echo set oexec=Wshell.Exec(program)
>>%tmp%\QQLOG.vbs echo rem
>>%tmp%\QQLOG.vbs echo wscript.Sleep 2000
>>%tmp%\QQLOG.vbs echo Wshell.SendKeys "QQ登陆密码"
>>%tmp%\QQLOG.vbs echo wscript.Sleep 1000
>>%tmp%\QQLOG.vbs echo Wshell.SendKeys "{TAB}"
>>%tmp%\QQLOG.vbs echo Wshell.SendKeys "QQ号码"
>>%tmp%\QQLOG.vbs echo wscript.Sleep 1000
>>%tmp%\QQLOG.vbs echo Wshell.SendKeys "{ENTER}"
>>%tmp%\QQLOG.vbs echo Wshell.SendKeys "{ENTER}"
>>%tmp%\QQLOG.vbs echo rem
%tmp%\QQLOG.vbs
del %tmp%\QQLOG.vbs
将如上代码保存成为BAT批处理文件,直接双击即可运行。