回复 1# gzh888666
我很喜欢这样的题目
随便写了一个,没有达到要求
_QQLogin("C:\Program Files\Tencent\QQ\Bin\QQ.exe", '123456789', '111aaabbb')
_QQLogin("C:\Program Files\Tencent\QQ\Bin\QQ.exe", '123456789', '111aaabbb', '', 5)
;$path=QQ的路径
;=============================================================================================
;$path=QQ的路径
;$Username=用户名
;$Password=密码
;$Remember=是否选中记住密码:0为否,1为是。默认为0。(可选)
;$Status=登录状态:0=我在线上,1=Q我吧,2=离开,3=忙碌,4=请勿打扰,5=隐身 。默认为0。(可选)
;$Agnt=网络代理:
;0=不使用代理 1=使用浏览器设置。
;=============================================================================================
Func _QQLogin($path, $Username, $Password, $Remember = 0, $Status = 0, $Agent = 0)
Opt("WinWaitDelay", 100)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 0)
If Not ProcessExists("QQ.exe") Then
Run($path)
_WinWaitActivate("QQ2010", '')
MouseClick("left", 188, 196, 1)
MouseClick("left", 113, 196, 1);取消记住密码和自动登录
ControlClick("QQ2010", "", "[CLASS:ATL:30A561F0]", "left", 1);选中帐号
Send("{DEL}");清除帐号
Send($Username);输入帐号
ControlClick("QQ2010", "", "Edit1", "left", 1);选中密码
Send($Password, 1);输入密码
If $Agent = 0 Then
MouseClick("left", 52, 226, 1)
_WinWaitActivate("设置", "")
MouseClick("left", 164, 136, 1)
MouseClick("left", 146, 156, 1)
MouseClick("left", 340, 360, 1);不使用代理
Else
MouseClick("left", 61, 224, 1)
_WinWaitActivate("设置", "")
MouseClick("left", 111, 137, 1)
MouseClick("left", 113, 213, 1)
MouseClick("left", 341, 354, 1);使用浏览器设置
EndIf
_WinWaitActivate("QQ2010", '')
If $Status = 5 Then
MouseClick("left", 82, 193, 1)
MouseClick("left", 86, 341, 1);隐身登陆
ElseIf $Status = 4 Then
MouseClick("left", 82, 195, 1)
MouseClick("left", 119, 312, 1);请勿打扰
ElseIf $Status = 3 Then
MouseClick("left", 84, 194, 1)
MouseClick("left", 118, 297, 1);忙碌
ElseIf $Status = 2 Then
MouseClick("left", 74, 193, 1)
MouseClick("left", 109, 273, 1);离开
ElseIf $Status = 1 Then
MouseClick("left", 85, 191, 1)
MouseClick("left", 114, 252, 1);Q我吧
Else
MouseClick("left", 84, 196, 1)
MouseClick("left", 88, 216, 1);我在线上
EndIf
If $Remember = 0 Then
MouseClick("left", 188, 196, 1)
MouseClick("left", 113, 196, 1);取消记住密码和自动登录
Else
MouseClick("left", 188, 196, 1)
MouseClick("left", 113, 196, 2);记住密码
EndIf
MouseClick("left", 295, 228, 1);登录
Else
Exit
EndIf
EndFunc ;==>_QQLogin
Func _WinWaitActivate($title, $text, $timeout = 0)
WinWait($title, $text, $timeout)
WinActivate($title, $text)
WinWaitActive($title, $text, $timeout)
EndFunc ;==>_WinWaitActivate
|