• 首页
  • 教程
  • 资源
  • 脚本
  • 新闻
  • 会员
加入收藏  返回官网
你的位置:按键网资源站
【QQ三国】行脚源代码(我不是标题党)【此贴必火】
发布: 2013-06-06 17:03:09 | 作者: | 来源: 按键网资源站
本帖最后由 .猪﹖_| 于 2013-8-1 15:08 编辑

不好意思 QQ三国行脚永久的代码  不能就这样白给了    ,希望大家看了 给我送花  给我评分  
作为我继续更新,继续优化的动力好吗,我相信会有更多大家满意的脚本分享给大家
求大家给我支持  


当有 500朵献花,500个银币的时候我会把行脚的最新智能判断和附件全部上传上来

回复可见

本帖隐藏的内容需要回复才可以浏览[hide=d15]
// 首先打包dm.dll和RegDll.dll到附件,当然如果你还有其它资源(字库,图片等)也可以一并打包

// 这个need_ver作为本脚本需要使用的插件版本. 如果要换插件时,记得更改这个值.
need_ver = "3.1233"

// 插件需要用到atl系统库,有些XP精简系统会把atl.dll精简掉. 为了防止注册失败,这里手动注册一下atl.dll
set ws=createobject("Wscript.Shell")
ws.run "regsvr32 atl.dll /s"
set ws=nothing

// 释放附件>>>>>>>>>>>>>>>>>>>
// 这里选择c盘的test-_game作为插件的基本目录 也就是SetPath对应的目录。所以所有资源都释放在此目录.
PutAttachment "c:\test_game","*.*"
// 这里要用到RegDll来注册插件,所以必须释放到Plugin. 但是切记不能把dm.dll释放到Plugin.那会导致插件失效.
PutAttachment ".\Plugin" ,"RegDll.dll"

// 插件注册开始>>>>>>>>>>>>>>>>>>>
// 下面开始注册插件,先尝试用RegDll来注册.这里必须使用绝对路径。以免有别人把dm.dll释放在系统目录.造成版本错误.
Call Plugin.RegDll.Reg("c:\test_game\dm.dll")

// 这里判断是否注册成功
set dm = createobject("dm.dmsoft")
ver = dm.Ver()
if ver <> need_ver then
// 先释放先前创建的dm
set dm = nothing
// 再尝试用regsvr32 来注册. 这里必须使用绝对路径。以免有别人把dm.dll释放在系统目录.造成版本错误.
set ws=createobject("Wscript.Shell")
ws.run "regsvr32 c:\test_game\dm.dll /s"
set ws=nothing
Delay 1500

// 再判断插件是否注册成功
set dm = createobject("dm.dmsoft")
ver = dm.Ver()
if ver <> need_ver then
// 这时,已经确认插件注册失败了。 弹出一些调试信息,以供分析.
messagebox "插件版本错误,当前使用的版本是:"&ver&",插件所在目录是:"&dm.GetBasePath()
messagebox "请关闭程序,重新打开本程序再尝试"
endscript
end if
end if
//=========以上是每次写代码时,必须复制的,注册大漠(不用了解)=====

//====== 以下绑定窗口======
//獲取鼠標指向的窗口句柄
hwnd = dm.GetMousePointWindow()
//綁定指定的窗口,並指定這個窗口的屏幕顏色獲取方式,鼠標仿真模式,鍵盤仿真模式,以及模式設定
dm_ret = dm.BindWindow(hwnd,"dx","windows3","windows",1)
// =====以上是后台绑定窗口模式====
UserVar E=2 "设置行脚的次数"
D = 0

Rem 继续行脚

dm_ret = dm.SetWindowText(hwnd,"你设置跳"& E &"行脚""现在是第"& D &"行脚")
If D = E Then
Goto 结束行脚
Else
End If
//-------错题判断----------
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,800,600,"答错.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
MessageBox "答错了"
Delay 302000
Goto 等待错题
End If
//-------错题判断----------
// -----------以下是跟---行脚商---对话过程-----
Rem 等待错题
Delay 800
dm.KeyPress 71
Delay 500
dm.KeyPress 40
Delay 800
dm.KeyPress 13
Delay 800
dm.KeyPress 13
Delay 800
dm.KeyPress 13
Delay 800
// -----------以上是跟---行脚商---对话过程-----

//-----以下是进入行脚打开地图的过程--(判断洞口,并启动)-----
Rem 重新判断
dm.KeyPress 77
Rem 继续查找
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,800,600,"判洞1.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 77
Call 通用()
Call 洞口1()
Delay 1000
Call 跑题中()
Delay 3000
Goto 继续行脚
End If

dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,800,600,"判洞2.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 77
Call 通用()
Call 洞口2()
Delay 1000
Call 跑题中()
Delay 3000
Goto 继续行脚
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,800,600,"判洞3.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 77
Call 通用()
Call 洞口3()
Delay 1000
Call 跑题中()
Delay 3000
Goto 继续行脚
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,800,600,"判洞4.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 77
Call 通用()
Call 洞口4()
Delay 1000
Call 跑题中()
Delay 3000
Goto 继续行脚
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,800,600,"判洞5.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 77
Call 通用()
Call 洞口5()
Delay 1000
Call 跑题中()
Delay 3000
Goto 继续行脚
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,800,600,"判洞6.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 77
Call 通用()
Call 洞口6()
Delay 1000
Call 跑题中()
Delay 3000
Goto 继续行脚
End If
Goto 继续查找
//-----以上是进入行脚打开地图的过程--(判断洞口,并启动)-----












//以下是洞口-----1------的子程序打包
Sub 洞口1()

t0 = timer //計時比對用初始化
dm.KeyDown 37
Rem 人物9
If timer - t0 >= 30 Then
dm.keyup 37
Call 卡住()
Goto 结束1
End if
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物9.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Else
Goto 人物9
End If

Delay 600
dm.KeyPress 32
Delay 500
t0 = timer //計時比對用初始化
Rem 人物17
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束1
End if
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物17.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 37
Else
Goto 人物17
End If
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyDown 37
t0 = timer //計時比對用初始化
Rem 人物18
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束1
End if
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物18.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 37
Else
Goto 人物18
End If
Delay 500
dm.KeyPress 32
dm.KeyDown 37
t0 = timer //計時比對用初始化
Rem 人物19
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束1
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物19.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 37
Else
Goto 人物19
End If
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyDown 39
t0 = timer //計時比對用初始化
Rem 人物20
If timer - t0 >= 30 Then
dm.KeyUp 39
Call 卡住()
Goto 结束1
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物20.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Else
Goto 人物20
End If
Delay 500

t0 = timer //計時比對用初始化
Rem 人物21
If timer - t0 >= 30 Then
dm.KeyUp 39
Call 卡住()
Goto 结束1
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物21.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Else
Goto 人物21
End If

Delay 600
dm.KeyDown 38
dm.KeyDown 39
t0 = timer //計時比對用初始化
Rem 人物22
If timer - t0 >= 30 Then
dm.KeyUp 38
dm.KeyUp 39
Call 卡住()
Goto 结束1
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物22.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Delay 300
dm.KeyUp 38
dm.KeyUp 39
Else
Goto 人物22
End If
Delay 500
dm.KeyDown 37
t0 = timer //計時比對用初始化
Rem 人物23
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束1
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物23.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Else
Goto 人物23
End If
Delay 500

t0 = timer //計時比對用初始化
Rem 人物24
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束1
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物24.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Else
Goto 人物24
End If
Delay 500

t0 = timer //計時比對用初始化
Rem 人物25
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束1
End If

dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物25.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Else
Goto 人物25
End If
Delay 500

t0 = timer //計時比對用初始化
Rem 人物26
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束1
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物26.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 37
Delay 500
dm.KeyPress 38
Else
Goto 人物26
End If
Rem 结束1
End Sub











//---- 一下是洞口-----5----的子程序打包
Sub 洞口5()

dm.KeyDown 39
dm.KeyDown 40
Delay 1000
dm.KeyUp 39
dm.KeyUp 40
Delay 100
dm.KeyPress 32
Delay 600
dm.KeyDown 37
t0 = timer //計時比對用初始化
Rem 人物13
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束5
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,900,700,"人物13.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Delay 50
dm.KeyPress 32
Else
Goto 人物13
End If
Delay 500

t0 = timer //計時比對用初始化
Rem 人物14
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束5
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物14.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 37
dm.KeyDown 39
Delay 3000
Else
Goto 人物14
End If

Delay500
dm.KeyDown 37
t0 = timer //計時比對用初始化
Rem 人物15
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束5
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物15.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Else
Goto 人物15
End If
Delay 500
t0 = timer //計時比對用初始化
Rem 人物16
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束5
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物16.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 37
Delay 100
dm.KeyPress 38
Else
Goto 人物16
End If
Rem 结束5
End Sub












Sub 洞口2()
dm.KeyDown 37
dm.KeyDown 38
Delay 3500
dm.KeyUp 37
Delay 1500
dm.KeyDown 39
Rem 人物1
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物1.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 39
Goto 继续人物1
Else
Goto 人物1
End If
Rem 继续人物1
dm.KeyPress 32
Delay 500
dm.KeyDown 39
t0 = timer //計時比對用初始化
Rem 人物2
If timer - t0 >= 30 Then
dm.KeyUp 39
Call 卡住()
Goto 结束2
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物2.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Delay 500
dm.KeyDown 38
Delay 3500
dm.KeyUp 39
Delay 1500
Goto 继续人物2
Else
Goto 人物2
End If
Rem 继续人物2
dm.KeyDown 37
t0 = timer //計時比對用初始化
Rem 继续人物3
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束2
End If

dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物3.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Goto 人物3继续走
Else
Goto 继续人物3
End If
Rem 人物3继续走

t0 = timer //計時比對用初始化
Rem 人物4
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束2
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物4.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Else
Goto 人物4
End If
Delay 500
dm.KeyDown 38
Delay 6000
dm.KeyUp 37
//---最后进洞的判断-----
Rem 人物5
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物5.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 38
Delay 100
dm.KeyPress 38
Else
Goto 人物5
End If
Rem 结束2
// ----- 以上是脚本命令-----
End Sub












Sub 洞口3()
dm.KeyDown 39
dm.KeyDown 38
t0 = timer //計時比對用初始化
Rem 人物6
If timer - t0 >= 30 Then
dm.KeyUp 38
dm.KeyUp 39
Call 卡住()
Goto 结束3
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物6.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 38
dm.KeyUp 39
Goto 继续人物6
Else
Goto 人物6
End If
Rem 继续人物6
Delay 300
dm.KeyDown 37
dm.KeyDown 38
Rem 人物7
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0, 0, 800, 600, "人物7.bmp", "000000", 0.9, 0, intX, intY)
If intX >= 0 and intY >= 0 Then
Delay 200
dm.KeyUp 38
Delay 50
dm.KeyUp 37
Goto 继续人物7
Else
Goto 人物7
End If
rem 继续人物7
dm.KeyDown 39
Delay 2000
dm.KeyDown 40

t0 = timer //計時比對用初始化
Rem 人物8
If timer - t0 >= 30 Then
dm.KeyUp 39
dm.KeyUp 40
Call 卡住()
Goto 结束3
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,900,700,"人物28.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Delay 50
dm.KeyUp 39
Delay 50
dm.KeyUp 40
Delay 50
dm.KeyPress 32
Delay 1000
dm.KeyPress 38
Goto 继续人物8
Else
Goto 人物8
End If
rem 继续人物8
Rem 结束3
// ----- 以上是脚本命令-----
End Sub












Sub 洞口4()
// ----- 以下是4脚本命令-----

Delay 100
dm.KeyDown 37
Rem 人物9
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,900,700,"人物9.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 32
Else
Goto 人物9
End If
Delay 1000
dm.KeyPress 32
Delay 500
dm.KeyDown 40
t0 = timer //計時比對用初始化
Rem 人物10
If timer - t0 >= 30 Then
dm.KeyUp 37
dm.KeyUp 40
Call 卡住()
Goto 结束4
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物10.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 37
dm.KeyUp 40
Delay 500
dm.KeyPress 38
Else
Goto 人物10
End If
Rem 结束4
End Sub








Sub 洞口6()

dm.KeyDown 38
Delay 50
dm.KeyDown 39
t0 = timer //計時比對用初始化
Rem 人物11
If timer - t0 >= 30 Then
dm.KeyUp 38
dm.KeyUp 39
Goto 跳过
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,900,700,"人物11.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 38
dm.KeyUp 39
Else
Goto 人物11
End If
Rem 跳过
Delay 1000
dm.KeyDown 37
Delay 50
dm.KeyDown 40
Delay 8500
dm.KeyUp 37
dm.KeyUp 40
Delay 500
dm.KeyDown 39
Delay 50
dm.KeyDown 40
Delay 4500
dm.KeyUp 39
Delay 50
dm.KeyUp 40
Delay 400
dm.KeyDown 37
t0 = timer //計時比對用初始化
Rem 人物12
If timer - t0 >= 30 Then
dm.KeyUp 37
Call 卡住()
Goto 结束6
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"人物12.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 37
Else
Goto 人物12
End If
Delay 500
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 38
// ----- 以上是脚本命令-----
Rem 结束6
End Sub








Sub 通用()

Delay 500
dm.KeyDown 37
Delay 500
Rem 坐标8
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"坐标8.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 37
Else
Goto 坐标8
End If

Delay 300
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyDown 37
Delay 500
dm.KeyPress 32
dm.KeyUp 37
Delay 500
dm.KeyDown 39
Delay 150
dm.KeyPress 32
t0 = timer //計時比對用初始化
Rem 坐标258
If timer - t0 >= 30 Then
dm.KeyUp 39
Call 卡住()
Goto 通用
End If

dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"坐标258.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 39
dm.KeyDown 37
Delay 800
dm.KeyUp 37
Goto 开始走洞
Else
Delay 500
dm.KeyPress 32
End If
Goto 坐标258
Rem 开始走洞
//------以上是每个洞的必经路------(通用)--- 下面开始进2号洞口
Rem 通用
End sub







Sub 卡住()
do
Delay 500
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,900,700,"卡点1.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Call 办法1()
Goto 重新判断
Exit do
Else
End If
Delay 50
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,900,700,"卡点2.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Goto 重新判断
Exit do
Else
End If
Delay 50
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,900,700,"卡点3.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyDown 39
Delay 6000
dm.KeyUp 39
Goto 重新判断
Exit do
Else
End If
loop




End sub



Sub 办法1()
Delay 500
dm.keydown 39
Rem 办法1
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"办法1.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.keyup 39
Else
Goto 办法1
End If
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Delay 600
dm.KeyPress 32
Rem 办法2
dm.keydown 39
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(0,0,800,600,"办法2.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Delay 100
dm.keyup 39
Else
Goto 办法2
End If
Delay 600
dm.KeyPress 32
Delay 600
dm.keydown 39
Delay 800
dm.KeyPress 32
Delay 4500
dm.keyup 39

End Sub







Sub 跑题中()
D = D + 1

// ----- 以下是脚本命令-----
dm.KeyDown 39
Rem 继续跑题
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,800,600,"跑题.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyUp 39
Else
Goto 继续跑题
End If
Delay 500
dm.KeyPress 71
Delay 500
dm.KeyPress 13
Delay 500
dm.KeyPress 13
Delay 500
dm.KeyPress 13
Delay 500
dm.KeyPress 13
Delay 1000
dm.KeyPress 71
Delay 500
dm.KeyPress 13
Delay 500
dm.KeyPress 13
Delay 500
dm.KeyPress 13
Delay 500
//----以上是进入行脚管 开始在跑去道题的路上

dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(300,310,323,330,"零.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Else
dm.MoveTo 312, 321
Delay 50
dm.LeftClick
End if
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(300,339,323,359,"零.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Else
dm.MoveTo 312, 350
Delay 50
dm.LeftClick
End if
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(300,368,323,387,"零.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Else
dm.MoveTo 312, 379
Delay 50
dm.LeftClick
End If
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(300,281,323,307,"零.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Else
dm.MoveTo 312, 292
Delay 50
dm.LeftClick
End If

//------ 点击退出答题----
Delay 1000
Rem 退出答题了
dm_ret = dm.SetPath("C:\test_game") //设置调用路径
dm_ret = dm.FindPic(-50,-50,800,600,"退出答题.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo 422, 328
Delay 50
dm.LeftClick
Else
Goto 退出答题了
End if
Delay 500

// ----- 以上是脚本命令-----
dm.KeyPress 71
Delay 500
dm.KeyPress 13
Delay 500
dm.KeyPress 13
Delay 500

End Sub
Rem 结束行脚
dm.KeyPress 123
MessageBox "行脚结束"
// 下面这是脚本结束时执行的部分
EndScript
Sub OnScriptExit()
dm.UnBindWindow
End Sub

// 结束







[/hide]