|
马上加入TC
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
int bta = 0
int keycode=keyboard.waitkey()
if (keycode == 123)
int handle = thread.beginthreadex("sm.sm",convert.inttostr(hwnd),"hyq.jiebang",convert.inttostr(hwnd))
repeat(5)
bool xieru = help.writeini("jb",convert.inttostr(hwnd),convert.inttostr(handle),"c:\\wt\\abc1.ini")
if(xieru)
break
else
bta=bta+1
help.sleep(20)
if(bta>3)
help.messagebox("防止出错专用弹窗")
endif
endif
endrepeat
int bt = 0
int keycode=keyboard.waitkey()
if (keycode == 123)
help.sleep(500)
int hwnddown=dm.GetMousePointWindow()
string handledown=help.readini("jb",convert.inttostr(hwnddown),"c:\\wt\\abc1.ini")
bool sfcg
if(handledown!="")
int bt=0
repeat(10)
sfcg = thread.closethread(convert.strtoint(handledown,0))
if(sfcg)
help.sleep(200)
help.writeini("jb",convert.inttostr(hwnd),"","c:\\wt\\abc1.ini")
break
else
bt=bt+1
if(bt>7)
help.messagebox("防止出错专用弹窗")
endif
endif
endrepeat
help.sleep(1000)
endif
endif
1.这样关闭多线程有问题吗?为什么c:\\wt\\abc1.ini下对应的句柄线程ID已经成为了空,但是多线程还在运行?(而且没有弹出报错- -!)
多线程问题2.
我写的程序中没有一个死循环全部用的repeat循环加break跳出,用大漠的dm_ret = dm.FoobarPrintText(foobar,"大漠测试","ff0000")
滚动输出状态,为什么什么都没有动,线程就卡死了,如果线程关闭线程创建的大漠FOOBAR也会退出,有没有检测线程状态的方法?
问题3
还有数组报错的问题"数组调用超过越界"!
比如我举一个例子,鼠标移动到地图上会出现坐标,通过坐标比来实现计算地图上的目的坐标位置,
问题出现了:这个游戏队友会出现在地图上并提示队友的名字和坐标,这样就容易识别到好多种情况比如 "1,,,,,,2" ",2,2"等好多情况为了避免越界,需要好多种判断来实现不弹"数组调用越界",难道就没有别的办法了吗?不能简化下吗?
|
|