TC官方合作论坛
标题:
各位大神帮看看,,,,-----急
[打印本页]
作者:
kovsko
时间:
2012-9-11 21:58
标题:
各位大神帮看看,,,,-----急
[attach]5296[/attach]
各位大神....帮看看。。。这个退出按钮按了不关闭是为啥。。。。。、、、、、、下面是 写的。。
#include"自动打怪.t"
空间 问道
//定义默认空间
int 线程句柄
功能 逻辑型 开始_点击()
线程句柄=thread.beginthread("自动打怪.找窗口","")
返回 真
//函数返回语句
功能结束
功能 逻辑型 退出_点击()
辅助.等待(500)
线程.关闭(线程句柄)
返回 真
//函数返回语句
功能结束
功能 逻辑型 初始化()
bool ret
ret=help.regdll("rc:dm.dll",true)
if(!ret)
help.messagebox("插件注册成功")
endif
返回 真
功能结束
空间结束
//空间结束语句
---------------------------------------------------------------------------------------
这是另一个空间被调用的
#import "dm.dmsoft" dm
namespace 自动打怪
function int 找窗口()
system.setcurrentpath(help.getrcpath("rc:"))
整型 hwnd
字符型 内容
hwnd=窗口.找到窗口("","AskTao")
如果(hwnd==0)
辅助.消息框("窗口没有找到")
否则
内容=转换.整型转字符型(hwnd)
辅助.消息框(内容)
如果结束
help.sleep(500)
dm.SetWindowState(hwnd,12)
//help.sleep(500)
//int 窗口绑定
//窗口绑定= dm.BindWindow(hwnd,"normal","normal","normal",0)
//help.sleep(500)
//if(窗口绑定==0)
//help.messagebox("绑定失败")
//endif
//自动打怪.打怪()
help.sleep(500)
return 0
endfunction
function int 打怪()
dm.KeyPress(120)
help.sleep(2000)
dm.SetDict(0,"数字.txt")
string ret
ret = dm.Ocr(40,2,61,13,"f8fcf8-000000",1.0)
if(convert.strtoint(ret)>0)
help.messagebox(ret)
endif
return 0
endfunction
endnamespace
作者:
zxyc2000
时间:
2012-9-11 22:00
退出按钮最后加上help.exit()
作者:
ligancai
时间:
2012-9-11 22:23
功能 逻辑型 退出_点击()
辅助.等待(500)
线程.关闭(线程句柄)
返回 真
//函数返回语句
功能结束
退出功能写了线程.关闭(线程句柄)上去干什么.
想要停止功能新增加一个 按钮
作者:
jimye0526
时间:
2012-9-11 22:28
停止线程不代表退出脚本
作者:
jj815130583
时间:
2012-9-12 00:06
功能 逻辑型 退出_点击()
辅助.等待(500)
线程.关闭(线程句柄)
辅助.退出
返回 真
//函数返回语句
功能结束
谢谢,给采纳!
作者:
kovsko
时间:
2012-9-12 10:59
哦,,这样。。。谢谢。。
欢迎光临 TC官方合作论坛 (http://bbs.52tc.co/)
Powered by Discuz! X3.1