|
#import "dm.dmsoft" DM
namespace DTWS
int x,y,z,xc1,xc2,xc3
bool K
function bool start()
int xh,cd//序号,长度
string ckj,hwnd
ckj=window.classenumwindow("MainWnd class of ArkEngine")
xh=1
while(xh<=3)
hwnd=str.strsub(ckj,0,str.findchar(ckj,124))
varlist.addintid(xh,convert.strtoint(hwnd))
xh=xh+1
cd=str.strleng(hwnd)
ckj=str.strcut(ckj,cd+1,true)
endwhile
return true
endfunction
function bool a()
int zg,nl,sm//找怪,内力,生命
x=varlist.getintid(1)
DM.BindWindow(x,"dx","dx","dx",0)
DM.KeyPress(9)
while(true&&K)
zg=DM.CmpColor(303,58,"bd0000-000000",0.9)
if(zg==0)
DM.KeyPress(49)//大漠按键1
help.sleep(1000)
DM.KeyPress(50)//大漠按键2
help.sleep(1000)
sm=DM.CmpColor(209,58,"db0000-000000",0.9)
if(sm!=0)
DM.KeyPress(51)//大漠按键3
endif
help.sleep(1000)
nl=DM.CmpColor(211,74,"0049bd-000000",0.9)
if(nl!=0)
DM.KeyPress(52)//大漠按键4
endif
zg=DM.CmpColor(303,58,"bd0000-000000",0.9)
if(zg==0)
continue
endif
endif
DM.KeyPress(9)
endwhile
DM.UnBindWindow()
return true
endfunction
function bool b()
int zg,nl,sm//找怪,内力,生命
y=varlist.getintid(2)
DM.BindWindow(y,"dx","dx","dx",0)
DM.KeyPress(9)
while(true&&K)
zg=DM.CmpColor(303,58,"bd0000-000000",0.9)
if(zg==0)
DM.KeyPress(49)//大漠按键1
help.sleep(1000)
DM.KeyPress(50)//大漠按键2
help.sleep(1000)
sm=DM.CmpColor(209,58,"db0000-000000",0.9)
if(sm!=0)
DM.KeyPress(51)//大漠按键3
endif
help.sleep(1000)
nl=DM.CmpColor(211,74,"0049bd-000000",0.9)
if(nl!=0)
DM.KeyPress(52)//大漠按键4
endif
zg=DM.CmpColor(303,58,"bd0000-000000",0.9)
if(zg==0)
continue
endif
endif
DM.KeyPress(9)
endwhile
DM.UnBindWindow()
return true
endfunction
function bool c()
int zg,nl,sm//找怪,内力,生命
z=varlist.getintid(3)
DM.BindWindow(z,"dx","dx","dx",0)
DM.KeyPress(9)
while(true&&K)
zg=DM.CmpColor(303,58,"bd0000-000000",0.9)
if(zg==0)
DM.KeyPress(49)//大漠按键1
help.sleep(1000)
DM.KeyPress(50)//大漠按键2
help.sleep(1000)
sm=DM.CmpColor(209,58,"db0000-000000",0.9)
if(sm!=0)
DM.KeyPress(51)//大漠按键3
endif
help.sleep(1000)
nl=DM.CmpColor(211,74,"0049bd-000000",0.9)
if(nl!=0)
DM.KeyPress(52)//大漠按键4
endif
zg=DM.CmpColor(303,58,"bd0000-000000",0.9)
if(zg==0)
continue
endif
endif
DM.KeyPress(9)
endwhile
DM.UnBindWindow()
return true
endfunction
function bool button0_click()
DTWS.start()
K=true
xc1=thread.beginthread("DTWS.a")
xc2=thread.beginthread("DTWS.b")
xc3=thread.beginthread("DTWS.c")
return true
endfunction
function bool exit_click()
K=false
help.messagebox("谢谢使用,程序将在2秒后退出")
help.sleep(2500)
thread.closethread(xc1)
thread.closethread(xc2)
thread.closethread(xc3)
help.exit()
return true
endfunction
endnamespace |
|