自动输入的问题[已解决]
本帖最后由 无名蜘蛛 于 2010-9-21 07:46 编辑#include<guiconstantsex.au3>
$qqlogin = GUICreate("QQ登陆器",150,400,-1,-1)
$qqpath = IniRead("qqlogin.ini","qqlogin","path","qq.exe")
$qqmz1 = IniRead("qqlogin.ini","figure","mz1","qq1111")
$button1 = GUICtrlCreateButton($qqmz1,30,30,90,25)
$button2 = GUICtrlCreateButton("号码二",30,70,90,25)
$button3 = GUICtrlCreateButton("号码三",30,110,90,25)
$button4 = GUICtrlCreateButton("号码四",30,150,90,25)
$button5 = GUICtrlCreateButton("号码五",30,190,90,25)
$button6 = GUICtrlCreateButton("号码六",30,230,90,25)
$button7 = GUICtrlCreateButton("号码七",30,270,90,25)
$button8 = GUICtrlCreateButton("号码八",30,310,90,25)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $button1
Run($qqpath)
$qq1 = IniRead("qqlogin.ini","figure","qq1","")
$pw1 = IniRead("qqlogin.ini","figure","pw1","")
WinWaitActive("")
ControlSend("QQ2010","","",$qq1)
ControlSend("QQ2010","","",$pw1)
Send("{enter}")
EndSwitch
WEnd他只会输入账号密码不会输,
还有种方法是按顺序输入,可是QQ以前登陆过账号,打开默认光标在密码输入框,如果新装的QQ,没有任何登陆记录的话,默认光标在号码输入框,按顺序输入是不可以实现的,我用controlClick也不成功,难道是他把那个EDIT加密了吗? 试一下这个Case $button1
Run($qqpath)
$qq1 = IniRead("qqlogin.ini", "figure", "qq1", "")
$pw1 = IniRead("qqlogin.ini", "figure", "pw1", "")
WinActivate("")
ControlSend("QQ2010", "", "", $qq1)
ControlClick("QQ2010", "", "", "left", 1)
Send("{tab}")
Send($pw1)
Send("{enter}") WinActivate("")居然自动跳过了,他好像都没用,没用出现此窗口他也执行下一条命令
我测试的那台机启动QQ有点慢,第一次启动不成功,不过第二次就点QQ就启动很快,当然成功 本帖最后由 lixiaolong 于 2010-9-21 07:20 编辑
Case $button1
Run($qqpath)
$qq1 = IniRead("qqlogin.ini", "figure", "qq1", "")
$pw1 = IniRead("qqlogin.ini", "figure", "pw1", "")
WinWaitActive("QQ2010");暂停脚本的执行直至指定窗口被激活(成为活动状态)为止.
ControlSend("QQ2010", "", "", "{DEL}");清除帐号
ControlSend("QQ2010", "", "", $qq1);输入帐号
ControlClick("QQ2010", "", "", "left", 1);选中帐号
Send("{tab}");按一下TAB键
Send($pw1);输入密码
Send("{enter}");登陆 非常有逻辑!!!!!
页:
[1]