|
马上加入TC
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
别让我看官方教程..我看了五遍了.到现在都不懂..!!!!!!!!!!
运行提示数组越界..单步调试..指针跳来跳去..我都晕了
求好心人解答!!!!!!
namespace TEST
string[] rstr //窗口数组
int number,add //number 窗口数量..ADD窗口数量叠加
function bool messagebox() //自动喊话
string message = edit.gettext("edit0") //获得编辑框中的文本内容
int windows = convert.strtoint(rstr[add])
window.postkeypress(windows,13) //回车
help.sleep(100)
window.poststring(windows,message) //发送内容
help.sleep(100)
window.postkeypress(windows,13)
help.sleep(50)
return true
endfunction
function bool FindWindow() //找窗口
string windowclass = system.enum("WSGAME",1) //枚举窗口类名
if(windowclass !="") //窗口类名不等于空则执行分割等操作
str.split(windowclass,"|",rstr)
array.size(rstr,number)
while (add<number) //窗口叠加数不可以超过窗口数量
thread.beginthread("TEST.messagebox",rstr[add]) //**************多线程开启*************
add = add +1 //叠加执行下一个数组里的窗口
endwhile
endif
return true
endfunction
function bool start_click()
TEST.FindWindow()
return true
endfunction
|
|