- 超级版主
- 1228894
- 26975
- 25
- 8050 朵
- 36129 个
- 4746 个
- 421340
- 2012-07-18
|
2#
t
T
发表于 2024-03-29 16:02
|
|只看该用户
, - Dim 测试范围,xx,yy,xx1,yy1,x1,x2,y1,y2
- //----------如何从输入框获取找图范围并加上xx,yy,xx1,yy1用来找图
- xx=1
- yy=29
- xx1=8
- yy1=37
- //----------
- 测试范围 = Form1.InputBox1.Text//输入框内容为xx+0,yy+900,xx1+90,yy1+1000
- Call 自定范围(测试范围)
- FindPic x1,x2,y1,y2,"C:\Users\Administrator\Desktop\111.bmp",0.9,intX,intY
- If intX > 0 And intY > 0 Then
- TracePrint "找到按键精灵"
- Else
- TracePrint "未找到按键精灵"
- End If
- Function 自定范围(范围)
- xy = 范围
- 要改变的Q=" "
- 变成Q = ""
- xy = Replace(xy, 要改变的Q, 变成Q)
- 要改变的=","
- 变成 = "|"
- xy = Replace(xy, 要改变的, 变成)
- xy = split(xy, "|")
- x1 = eval(xy(0))
- y1 = eval(xy(1))
- x2 = eval(xy(2))
- y2 = eval(xy(3))
- TracePrint x1&","&y1&","&x2&","&y2
- End Function
复制代码
|