/**
*此版本號適合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