回复 3楼cainiao007的帖子
这是3.039版字符串分割里的例子
string[] rstr=string[1] //需要先初始化一次
string sourcestr="AB:CD:EF:GH:JK",splitstr=":"
bool isok=str.split(sourcestr,splitstr,rstr)
我刚才测试了一下,的确可以不用初始化。
对于你数组越界的问题,你按照下面这个代码修改试试。
function bool messagebox(string handle) //自动喊话
string message = edit.gettext("edit0") //获得编辑框中的文本内容
int windows = convert.strtoint(handle)
window.postkeypress(windows,13) //回车
help.sleep(100)
window.poststring(windows,message) //发送内容
help.sleep(100)
window.postkeypress(windows,13)
help.sleep(50)
return true
endfunction |