我利用下拉框定义a的内容,然后把a作为找图的目标,但是下拉框里面的a好像定义不了,我不太明白下拉框里面要用什么代码,之前不做下拉框的时候是可以运行的。
Event Form1.ComboBox1.SelectChange
Select Case Form1.ComboBox1.ListIndex
Case 0
a="Attachment:\1.bmp"
Case 1
a="Attachment:\2.bmp"
Case 2
a="Attachment:\3.bmp"
Case 3
a = "Attachment:\4.bmp"
Case 4
a = "Attachment:\5.bmp"
Case 5
a = "Attachment:\6.bmp"
Case 6
a = "Attachment:\7.bmp"
Case 7
a = "Attachment:\8.bmp"
Case 8
a = "Attachment:\9.bmp"
End Select
End Event
FindPic 0,0,1920,1080,a,1,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intx, inty
Delay 50
LeftClick 1
Delay 50
FindPic 0,0,1920,1080,"Attachment:\jinru.bmp",1,intX,intY
If intX > 0 And intY > 0 Then
Delay 50
MoveTo intx, inty
Delay 100
LeftClick 1
Delay 300
End If
End If
Event Form1.ComboBox1.SelectChange
Select Case Form1.ComboBox1.ListIndex
Case 0
a="Attachment:\1.bmp"
Case 1
a="Attachment:\2.bmp"
Case 2
a="Attachment:\3.bmp"
Case 3
a = "Attachment:\4.bmp"
Case 4
a = "Attachment:\5.bmp"
Case 5
a = "Attachment:\6.bmp"
Case 6
a = "Attachment:\7.bmp"
Case 7
a = "Attachment:\8.bmp"
Case 8
a = "Attachment:\9.bmp"
End Select
End Event
FindPic 0,0,1920,1080,a,1,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intx, inty
Delay 50
LeftClick 1
Delay 50
FindPic 0,0,1920,1080,"Attachment:\jinru.bmp",1,intX,intY
If intX > 0 And intY > 0 Then
Delay 50
MoveTo intx, inty
Delay 100
LeftClick 1
Delay 300
End If
End If