/**
*此版本号适合windows版微信,电脑的分辨率须要调到1366*768
*/
x = 387 //第一行第一列的横坐标
y = 94 //第一行第一列的纵坐标
For i = 0 To 83
//计算xy轴的坐标
If i >= 13 And i < 26 Then
y1 = y + 116
z = x + 75 * (i-13)
ElseIf i >= 26 And i < 39 Then
y1 = y + 116 * 2
z = x + 75 * (i-26)
ElseIf i >= 39 And i < 52 Then
y1 = y + 116 * 3
z = x + 75 * (i - 39)
ElseIf i >= 52 And i < 65 Then
y1 = y + 116 * 4
z = x + 75 * (i-52)
Else
y1 = y
z = x + 75 * i
End If
MoveTo z, y1
Delay 500
LeftClick 1
Delay 500
//查找图片,推断是否已加过好友了
FindPic z-300,y1-300,1500,1000,"Attachment:\1.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
//MessageBox "找到了"
MoveTo intX + 100, intY + 10 //移动到加入好友button
Delay 500
LeftClick 1
Delay 500
MoveTo 714, 468 //点击确定发送验证信息
Delay 500
LeftClick 1
Delay 500
MoveTo 681, 432 //点击确定验证信息发送完毕
Delay 1000
LeftClick 1
Delay 500
Else
MoveTo z, 40
//MessageBox "没找到"
LeftClick 1
End If
Delay 500
Next