下面是自动登陆QQ的代码,有一个问题:
如果QQ程序里有登陆帐号记录,则成功登陆
如果是新安装的QQ程序,将不能成功登陆
我知道是哪里有问题
就VBS是输入QQ号码的时候先按了一下TAB键
但是把这个去掉的话
有登陆帐号记录的就会不成功
请问怎么办呢?
不会编两个吧?
- @echo off
- color 46
- title QQ自动登陆
- mode con cols=40 lines=10
- echo.
- echo 本程序将为您开机自动登陆QQ
- echo.
- echo 请确认您的QQ不是新安装的
- echo 如果是:请登陆一次QQ号码再运行
- echo 正在查找QQ安装目录,请等待......
- set "primitivepath=%cd%"
- for %%a in (a b c d e f g h i j) do (
- if exist %%a:\ (
- for /f "delims=" %%i in ('dir "%%a:\qq.exe" /b /s 2^>nul') do set _path=%%~dpi&goto :next
- ))
- :next
- echo 安装目录:%_path%
- set /p qqhaoma=请输入要登陆的QQ号码:
- set /p qqmima=请输入您的密码:
- echo @echo off >%windir%\qq.bat
- echo title QQ自动登陆器>>%windir%\qq.bat
- echo color 46>>%windir%\qq.bat
- echo echo.>>%windir%\qq.bat
- echo echo.>>%windir%\qq.bat
- echo echo 准备登陆您的QQ,请等待。。。。>>%windir%\qq.bat
- echo echo.>>%windir%\qq.bat
- echo echo.>>%windir%\qq.bat
- echo echo.>>%windir%\qq.bat
- echo echo 此次登陆的QQ号码为:%qqhaoma% 为了安全起见,将不显示您的密码>>%windir%\qq.bat
- echo echo 请不要动鼠标或键盘!!>>%windir%\qq.bat
- echo ping -n 5 127.1 ^>nul 2^>nul >>%windir%\qq.bat
- echo echo set os = CreateoBject("wscript.shell")^>^>1.vbs >>%windir%\qq.bat
- echo echo wscript.sleep 50^>^>1.vbs >>%windir%\qq.bat
- echo echo os.run """%_path%QQ.exe"""^>^>1.vbs >>%windir%\qq.bat
- echo echo wscript.sleep 5000^>^>1.vbs >>%windir%\qq.bat
- echo echo os.sendkeys "{tab}"^>^>1.vbs >>%windir%\qq.bat
- echo echo wscript.sleep 300^>^>1.vbs >>%windir%\qq.bat
- echo echo os.sendkeys "%qqhaoma%"^>^>1.vbs >>%windir%\qq.bat
- echo echo wscript.sleep 300^>^>1.vbs >>%windir%\qq.bat
- echo echo os.sendkeys "{tab}"^>^>1.vbs >>%windir%\qq.bat
- echo echo wscript.sleep 300^>^>1.vbs >>%windir%\qq.bat
- echo echo os.sendkeys "%qqmima%"^>^>1.vbs >>%windir%\qq.bat
- echo echo wscript.sleep 300^>^>1.vbs >>%windir%\qq.bat
- echo echo os.sendkeys "{enter}"^>^>1.vbs >>%windir%\qq.bat
- echo echo createobject^("scripting.filesystemobject"^).deletefile wscript.scriptname^>^>1.vbs >>%windir%\qq.bat
- echo start 1.vbs >>%windir%\qq.bat
- reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v qq /d "%windir%\qq.bat" /f
- echo set os = CreateoBject("wscript.shell")>%n%.vbs
- echo a=msgbox("点 是 立即登陆QQ 点 否 重启后生效",4,"询问")>>%n%.vbs
- echo if a=6 then>>%n%.vbs
- echo os.run """C:\windows\qq.bat""">>%n%.vbs
- echo end if>>%n%.vbs
- echo createobject^("scripting.filesystemobject"^).deletefile wscript.scriptname>>%n%.vbs
- start %n%.vbs
- exit
复制代码
[ 本帖最后由 lzwudi 于 2008-9-7 17:50 编辑 ] |