**/
Function searchSection(s_x,s_y,e_x,e_y,mBmp,mTemp)
Dim intX, intY
FindPic s_x, s_y, e_x, e_y, "Attachment:\" & mBmp & ".bmp",1.0, intX, intY
If intX > 0 and intY > 0 Then
If mTemp = 1 Then
Delay 200
MoveTo intX, intY
Delay 200
LeftClick 1
ElseIf mTemp = 2 Then
Delay 200
MoveTo intX, intY
Delay 500
LeftDoubleClick 1
End If
searchSection = 1
Else
searchSection = 0
MessageBox "找不到所选服务区"
Call reStartApp()
End If
End Function
/*---------------------------输入qq号和密码—————-----------*/
Function inputQQNumAndPaw()
Delay 15000
Hwnd = Plugin.Window.Find("TWINCONTROL", "地下城与勇士")
If Hwnd <> 0 Then
sRect = Plugin.Window.GetClientRect(Hwnd)
MyArray = Split(sRect, "|")
x = Clng(MyArray(0))
y = Clng(MyArray(1))
l = Clng(MyArray(2))
h = Clng(MyArray(3))
Call inputQQandPaw(x, y)
Delay 3000
Call judgeValidate(x, y, l, h)
Else
MessageBox "没有可输入的QQ和密码!"
Call reStartApp()
End If
End Function
/*
*@Fun inputQQNumber andr password
*@arg2
*@retun null
**/
Function inputQQandPaw(x, y)
SetSimMode 2
MoveTo x + 400, y + 375
Delay 800
LeftClick 1
Delay 300
KeyPress "BackSpace", 18
Delay 300
Call Lib.键盘.KeyList(QQNum, 2, 100)
Delay 300
KeyPress "Tab", 1
Call Lib.键盘.KeyList(QQpass, 2, 100)
Delay 500
KeyPress "Enter", 1
SetSimMode 0
End Function
/*---------------------------判断有无验证码—————-----------*/
Function judgeValidate(x,y,l,h)
While validateFlag
hasV = judgeHasValidate(x, y, x + l, y + h)
If hasV = 1 Then
Delay 20000
Else
validateFlag = false
End If
Wend
If Not validateFlag Then
Call selectChannel()
End If
End Function
/*
*@Fun 判断是否有验证码
*@arg null
*@retun null
**/
Function judgeHasValidate(s_x, s_y, e_x, e_y)
Dim intX, intY
FindPic s_x, s_y, e_x, e_y, "Attachment:\验证码.bmp", 1.0, intX, intY
If intX > 0 and intY > 0 Then
judgeHasValidate = 1
Else
judgeHasValidate = 0
End If
End Function
/*---------------------------选择频道—————-----------*/
Function selectChannel()
Delay 40000