//---------------------------查找窗口-----------------------------------
Hwnd = Plugin.Window.Foreground()
sRect = Plugin.Window.GetClientRect(Hwnd)
Dim MyArray
MyArray = Split(sRect, "|")
Ux = CLng(MyArray(0))
Uy = CLng(MyArray(1))
Call Plugin.Window.Move(Hwnd, 0, 0)
Dim a(10)
//地图
a(1) = "Attachment:\ditu21.bmp"
a(2) = "Attachment:\ditu22.bmp"
a(3) = "Attachment:\ditu23.bmp"
a(4) = "Attachment:\ditu24.bmp"
a(5) = "Attachment:\ditu25.bmp"
a(6) = "Attachment:\ditu26.bmp"
a(7) = "Attachment:\ditu27.bmp"
a(8) = "Attachment:\ditu28.bmp"
a(9) = "Attachment:\ditu29.bmp"
Call 找路
Sub 找路
For j = 1 To 9
FindPic 0,0,1024,768,a(j),0.9,intX,intY
If intX > 0 And intY > 0 Then
Delay 200
MoveTo intX, intY
Delay 200
LeftClick 1
Call 寻找矿坐标
End If
Next
End Sub
Sub 寻找矿坐标
Delay 2000
FindPic 0,0,1280,720,"Attachment:\zb.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Delay 400
MoveTo intX+10, intY+10
Delay 400
LeftClick 1
Else
Delay 2000
RightClick 1
End If
End Sub
按键精灵变量问题、找图用变量的时候会用13579这样,但是如果注释图片黄框中的就正常,123456789这样找图
答案:2 悬赏:50 手机版
解决时间 2021-03-08 01:20
- 提问者网友:山高云阔
- 2021-03-07 01:47
最佳答案
- 五星知识达人网友:鸽屿
- 2021-03-07 01:57
你找路的点如果没找到脚本还能连接上吗
全部回答
- 1楼网友:洎扰庸人
- 2021-03-07 02:44
变量是不固定的 你定义什么 什么就是变量
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯