|
FindPic 0, 0, 1439, 899,"Attachment:\w1.bmp",1,intX,intY
Dim RX,RY,d,e,f,g,i, j, m, n, s, l,p,q,r,t,w,v,zb(255)
d = Cint(Form1.InPutBox1.text)
e = Cint(Form1.InPutBox2.text)
f = Cint(Form1.InPutBox3.text)
g = Cint(Form1.InPutBox4.text)
p = Cint(Form1.InPutBox5.text)
//挂机X轴坐标
q = Cint(Form1.InPutBox6.text)
//挂机Y轴坐标
i = intX + 352
//挂机中心点X坐标
j = intY - 290
//挂机中心点Y坐标
Function zbx()
For RX = d To e Step 1
zb(RX) = "Attachment:\" & RX & ".bmp"
FindPic intX-34, intY-542, intX-9, intY-515, zb(RX), 1,intM, intN
If intM > 0 And intN > 0 Then
zbx=RX
Exit For
End If
Next
End Function
//获取当前X坐标
Function zby()
For RY = f To g Step 1
zb(RY) = "Attachment:\" & RY & ".bmp"
FindPic intX-11, intY-542, intX+15, intY-515, zb(RY), 1,intH, intI
If intH > 0 And intI > 0 Then
zby=RY
Exit For
End If
Next
End Function
//获取当前Y坐标
sub finpic(a, b)
m = a + 30
//找到物品点X坐标
n = b + 25
//找到物品点Y坐标
s = 2*i - m
l = 2*j -n
KeyPress "F10", 1
Delay 100
MoveTo m, n
//移到物品处
Delay 200
LeftDown 1
Delay 200
LeftUp 1
Delay 2000
MoveTo s, l
//移回原位
Delay 100
LeftDown 1
Delay 200
LeftUp 1
Delay 2000
MoveTo i,j
t = zby()
//回位后Y坐标
v = j + 38 * t - 38 * q
MoveTo i, v
LeftDown 1
Delay 300
LeftUp 1
Delay 300
r = zbx()
w = i - 23 * r + 23 * p
v = j - 23 * r + 23 * p
MoveTo w,v
LeftDown 1
Delay 300
LeftUp 1
Delay 300
KeyPress "F10", 1
End Sub
If intX > 0 And intY > 0 Then
While true
MoveTo i, j
If Form1.CheckBox6.Value = 1 Then
FindPic 0,0,1439,899,"Attachment:\zs.bmp",1,logox,logoy
If logox > 0 And logoy > 0 Then
Call finpic(logox,logoy)
End If
End If
If Form1.CheckBox4.Value = 1 Then
FindPic 0,0,1439,899,"Attachment:\cz.bmp",1,logox,logoy
If logox > 0 And logoy > 0 Then
Call finpic(logox,logoy)
End If
End If
If Form1.CheckBox1.Value = 1 Then
FindPic 0,0,1439,899,"Attachment:\zf.bmp",1,logox,logoy
If logox > 0 And logoy > 0 Then
Call finpic(logox,logoy)
End If
End If
If Form1.CheckBox2.Value = 1 Then
FindPic 0,0,1439,899,"Attachment:\lh.bmp",1,logox,logoy
If logox > 0 And logoy > 0 Then
Call finpic(logox,logoy)
End If
End If
If Form1.CheckBox3.Value = 1 Then
FindPic 0,0,1439,899,"Attachment:\sm.bmp",1,logox,logoy
If logox > 0 And logoy > 0 Then
Call finpic(logox,logoy)
End If
End If
If Form1.CheckBox7.Value = 1 Then
FindPic 0,0,1439,899,"Attachment:\sh.bmp",1,logox,logoy
If logox > 0 And logoy > 0 Then
Call finpic(logox,logoy)
End If
End If
If Form1.CheckBox8.Value = 1 Then
FindPic 0,0,1439,899,"Attachment:\my.bmp",1,logox,logoy
If logox > 0 And logoy > 0 Then
Call finpic(logox,logoy)
End If
End if
If Form1.CheckBox9.Value = 1 Then
FindPic 0,0,1439,899,"Attachment:\wd.bmp",1,logox,logoy
If logox > 0 And logoy > 0 Then
Call finpic(logox,logoy)
End If
End if
Wend
End If |
|