按键精灵后台找图,如果找到则跳转X,如果没找到跳转到X
按键精灵后台找图,如果找到则跳转X,如果没找到跳转到V,这个的源代码是什么?按键精灵小白,今天刚学。。。想做一个自动循环的脚本,但是这里面的后台找图判定有问题,不懂错误出...
按键精灵后台找图,如果找到则跳转X,如果没找到跳转到V,这个的源代码是什么?
按键精灵小白,今天刚学。。。想做一个自动循环的脚本,但是这里面的后台找图判定有问题,不懂错误出在哪,希望大神从新给改下,谢谢。
以下是源码
Plugin.RegDll.Reg "C:\path\dm.dll" '注册大漠插件,参数为大漠插件所在的位置
set dm = createobject("dm.dmsoft")'创建大漠对象
dm_ret = dm.SetPath("C:\path")'设置目录
WZY = Plugin.Window.MousePoint()
Rem a
//找图long FindPic(x1, y1, x2, y2, pic_name, delta_color,sim, dir,intX, intY)
dm_ret = dm.FindPic(202,260,279,281,"位图2.bmp","000000",0.9,2,x,y)
Delay 1000
If intX >= 0 Then
Delay 100
Call Plugin.Bkgnd.LeftClick(WZY,240,270)
Delay 3000
Goto c
If intX <= 0 Then
Delay 100
Goto b
End If
Rem c
Call Plugin.Bkgnd.LeftClick(WZY,523,11)
Delay 2000
Call Plugin.Bkgnd.LeftClick(WZY,199,337)
Delay 2000
Call Plugin.Bkgnd.LeftClick(WZY,820,606)
Delay 2000
Call Plugin.Bkgnd.LeftClick(WZY,964,12)
Delay 2000
Call Plugin.Bkgnd.LeftClick(WZY,824,644)
Delay 20000
Rem d
//找图long FindPic(x1, y1, x2, y2, pic_name, delta_color,sim, dir,intX, intY)
dm_ret = dm.FindPic(920,660,1000,750,"位图3.bmp","000000",0.9,2,x,y)
Delay 1000
If intX >= 0 Then
Delay 100
Call Plugin.Bkgnd.LeftClick(WZY,963,704)
Delay 1000
Goto e
Delay 100
If intX <= 0 Then
Delay 100
Goto d
Delay 5000
End If
Rem e
Delay 40000
Call Plugin.Bkgnd.KeyPress(WZY,79)
Delay 1000
Call Plugin.Bkgnd.LeftClick(WZY,686,638)
Delay 1000
Call Plugin.Bkgnd.LeftClick(WZY,737,638)
Delay 1000
Call Plugin.Bkgnd.LeftClick(WZY,786,638)
Rem b
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,87)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,69)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,82)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,115)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,84)
Delay 100
Call Plugin.Bkgnd.KeyPress(WZY,68)
Delay 100
Call Plugin.Bkgnd.KeyPress(WZY,68)
Delay 100
Call Plugin.Bkgnd.KeyPress(WZY,84)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,112)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,293,543)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,591,471)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,702,280)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,425,225)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,293,543)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,293,543)
Delay 1000
//找图long FindPic(x1, y1, x2, y2, pic_name, delta_color,sim, dir,intX, intY)
dm_ret = dm.FindPic(689,631,939,657,"位图1.bmp","000000",0.9,2,x,y)
Delay 1000
If intX >= 0 Then
Delay 100
Call Plugin.Bkgnd.LeftClick(WZY,896,644)
Delay 5000
Goto a
Delay 100
If intX <= 0 Then
Delay 100
Goto b
Delay 100
End If
如果XXX则XXX,这个判定该怎么写,最好有个能QQ语音教我一下的大神帮下忙,研究了一天这脚本,实在不知道怎么弄了,百度找的如果XXX则XXX放上去都说语句无法识别 展开
按键精灵小白,今天刚学。。。想做一个自动循环的脚本,但是这里面的后台找图判定有问题,不懂错误出在哪,希望大神从新给改下,谢谢。
以下是源码
Plugin.RegDll.Reg "C:\path\dm.dll" '注册大漠插件,参数为大漠插件所在的位置
set dm = createobject("dm.dmsoft")'创建大漠对象
dm_ret = dm.SetPath("C:\path")'设置目录
WZY = Plugin.Window.MousePoint()
Rem a
//找图long FindPic(x1, y1, x2, y2, pic_name, delta_color,sim, dir,intX, intY)
dm_ret = dm.FindPic(202,260,279,281,"位图2.bmp","000000",0.9,2,x,y)
Delay 1000
If intX >= 0 Then
Delay 100
Call Plugin.Bkgnd.LeftClick(WZY,240,270)
Delay 3000
Goto c
If intX <= 0 Then
Delay 100
Goto b
End If
Rem c
Call Plugin.Bkgnd.LeftClick(WZY,523,11)
Delay 2000
Call Plugin.Bkgnd.LeftClick(WZY,199,337)
Delay 2000
Call Plugin.Bkgnd.LeftClick(WZY,820,606)
Delay 2000
Call Plugin.Bkgnd.LeftClick(WZY,964,12)
Delay 2000
Call Plugin.Bkgnd.LeftClick(WZY,824,644)
Delay 20000
Rem d
//找图long FindPic(x1, y1, x2, y2, pic_name, delta_color,sim, dir,intX, intY)
dm_ret = dm.FindPic(920,660,1000,750,"位图3.bmp","000000",0.9,2,x,y)
Delay 1000
If intX >= 0 Then
Delay 100
Call Plugin.Bkgnd.LeftClick(WZY,963,704)
Delay 1000
Goto e
Delay 100
If intX <= 0 Then
Delay 100
Goto d
Delay 5000
End If
Rem e
Delay 40000
Call Plugin.Bkgnd.KeyPress(WZY,79)
Delay 1000
Call Plugin.Bkgnd.LeftClick(WZY,686,638)
Delay 1000
Call Plugin.Bkgnd.LeftClick(WZY,737,638)
Delay 1000
Call Plugin.Bkgnd.LeftClick(WZY,786,638)
Rem b
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,87)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,69)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,82)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,115)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,84)
Delay 100
Call Plugin.Bkgnd.KeyPress(WZY,68)
Delay 100
Call Plugin.Bkgnd.KeyPress(WZY,68)
Delay 100
Call Plugin.Bkgnd.KeyPress(WZY,84)
Delay 1000
Call Plugin.Bkgnd.KeyPress(WZY,112)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,293,543)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,591,471)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,702,280)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,425,225)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,293,543)
Delay 1000
Call Plugin.Bkgnd.RightClick(WZY,293,543)
Delay 1000
//找图long FindPic(x1, y1, x2, y2, pic_name, delta_color,sim, dir,intX, intY)
dm_ret = dm.FindPic(689,631,939,657,"位图1.bmp","000000",0.9,2,x,y)
Delay 1000
If intX >= 0 Then
Delay 100
Call Plugin.Bkgnd.LeftClick(WZY,896,644)
Delay 5000
Goto a
Delay 100
If intX <= 0 Then
Delay 100
Goto b
Delay 100
End If
如果XXX则XXX,这个判定该怎么写,最好有个能QQ语音教我一下的大神帮下忙,研究了一天这脚本,实在不知道怎么弄了,百度找的如果XXX则XXX放上去都说语句无法识别 展开
1个回答
展开全部
if 条件 then
条件成立 跳转到x
else
跳转到v
end if
条件成立 跳转到x
else
跳转到v
end if
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |