按键精灵大漠多线程问题
Delay100//多线程开始Dimenvbb=BeginThread(Thread2)BeginThreadThread1BeginThreadThread2//主线程...
Delay 100
//多线程开始
Dimenv b
b = BeginThread(Thread2)
BeginThread Thread1
BeginThread Thread2
//主线程缓冲
While 1
Delay 500
Wend
//线程一
Sub Thread1
While 1
If dm.IsDisplayDead(987, 642, 1017, 714, 10) Then
TracePrint "检测到卡屏了,重置处理"
StopThread b
Delay 500
End If
Wend
End Sub
//线程二
Sub Thread2
While 1
//【寻找附近最近挂机点】----------------------------------------------------------
dTx = dm.Ocr(994, 663, 1010, 673, "980204-670204|5A0404-2A0404|FF0000-000000|980404-670404", 0.9)
dTy = dm.Ocr(994, 699, 1010, 709, "980204-670204|5A0404-2A0404|FF0000-000000|980404-670404", 0.9)
Dsx = CLng(dTx)
Dsy = CLng(dTy)
TracePrint "人物当前坐标为:" & Dsx & "," & Dsy
wend
-------------------------------问题是------------------------------
语法是通过的,就是执行的时候,一直提示缺少"DM":
脚本 DK2后台挂机-NEW.Q ,第910行:大漠注册成功,当前大漠版本为:7.1825,当前大漠所在路径为c:\dddm\dmcj\
脚本 DK2后台挂机-NEW.Q ,第930行:后台绑定成功
脚本 DK2后台挂机-NEW.Q ,第45行:缺少对象: 'DM', 展开
//多线程开始
Dimenv b
b = BeginThread(Thread2)
BeginThread Thread1
BeginThread Thread2
//主线程缓冲
While 1
Delay 500
Wend
//线程一
Sub Thread1
While 1
If dm.IsDisplayDead(987, 642, 1017, 714, 10) Then
TracePrint "检测到卡屏了,重置处理"
StopThread b
Delay 500
End If
Wend
End Sub
//线程二
Sub Thread2
While 1
//【寻找附近最近挂机点】----------------------------------------------------------
dTx = dm.Ocr(994, 663, 1010, 673, "980204-670204|5A0404-2A0404|FF0000-000000|980404-670404", 0.9)
dTy = dm.Ocr(994, 699, 1010, 709, "980204-670204|5A0404-2A0404|FF0000-000000|980404-670404", 0.9)
Dsx = CLng(dTx)
Dsy = CLng(dTy)
TracePrint "人物当前坐标为:" & Dsx & "," & Dsy
wend
-------------------------------问题是------------------------------
语法是通过的,就是执行的时候,一直提示缺少"DM":
脚本 DK2后台挂机-NEW.Q ,第910行:大漠注册成功,当前大漠版本为:7.1825,当前大漠所在路径为c:\dddm\dmcj\
脚本 DK2后台挂机-NEW.Q ,第930行:后台绑定成功
脚本 DK2后台挂机-NEW.Q ,第45行:缺少对象: 'DM', 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询