回复 26# pp648852
昨天说过的。。。
试试吧,测试了效果不错,加到你的程序里,做个QQ版本的判断
$usr = "88888888";QQ号
$pwd = "88888888";密码
#include <Process.au3>
$ExistEdit1=0
Run(StringRegExpReplace(RegRead('HKEY_CLASSES_ROOT\Tencent\DefaultIcon', ''), '[^\\]+$', '') & 'QQ.exe')
WinWait("QQ2012")
$Newusr = StringRegExp($usr, "(.)", 3)
$Newpwd = StringRegExp($pwd, "(.)", 3)
Do
$list=WinList('[class:TXGuiFoundation]')
For $u=1 To $list[0][0]
$LPID=WinGetProcess($list[$u][1])
If _ProcessGetName($LPID)="QQ.exe" Then
$POS=WinGetPos($list[$u][1])
$ExistEdit1=ControlSend($list[$u][1], "", "Edit1", "+{tab}")
If $ExistEdit1 Then
Local $QQ[5]=[$list[$u][1],$POS[0],$POS[1],$POS[2],$POS[3]]
ExitLoop
EndIf
EndIf
Next
Sleep(300)
Until $ExistEdit1
Do
Sleep(300)
Until ControlSend($QQ[0], "", "Edit1", "+{tab}")
For $n = 0 To StringLen($usr) - 1
ControlSend($QQ[0], "", "", $Newusr[$n],1)
Next
For $n = 0 To 15
ControlSend($QQ[0], "", "Edit1", "{BS}")
Next
For $n = 0 To StringLen($pwd) - 1
ControlSend($QQ[0], "", "Edit1", $Newpwd[$n],1)
Next
ControlSend($QQ[0], "", "Edit1", "{enter}")
|