TC官方合作论坛

标题: 提示窗口的句柄值不能为空 怎么解决 [打印本页]

作者: 袭、羽    时间: 2012-12-2 23:58
标题: 提示窗口的句柄值不能为空 怎么解决
namespace mthreader
int  thre_hand
bool isstop
function int thre_moth()
    //while(true)
    //help.messagebox("this is a threader!!")
    //help.sleep(1000)
  //endwhile
  string ret=system.enum("Notepad",1)//类名枚举
     string[] str_hand=string[1]
     bool isok=str.split(ret,"|",str_hand)
  int c1,i=0
array.size(str_hand,c1)
while(i<c1)
    mthreader.send_window(str_hand)
    i=i+1
endwhile
return 0
endfunction
function int send_window(string str_han2)//向窗口发送信息
    string ret=system.enum("str_han2",3)//父窗口枚举子窗口
    string[] str_hand=string[1]
  bool isok=str.split(ret,"|",str_hand)
  int c1,i=0,hander
array.size(str_hand,c1)
while(i<c1)
     if(window.getwindowtype(convert.strtoint(str_hand,0))=="Edit")
         hander=convert.strtoint(str_hand)
         break
     endif
     i=i+1
endwhile
window.postkeypress(hander,13)
window.sendstring(hander,"hello Tc!!"+convert.inttostr(hander))
window.postkeypress(hander,13)
    return 0
endfunction
function bool start_click()
thre_hand=thread.beginthread("mthreader.thre_moth","")

return true

endfunction

function bool exit_click()

help.exit()

return true
endfunction


function bool stop_wheth_click()
if(!isstop)
     thread.suspendthread(thre_hand)
     isstop=true
else
     thread.resumethread(thre_hand)
    isstop=false
endif

return true
endfunction


function bool closser_click()

thread.closethread(thre_hand)
return true
endfunction

endnamespace

作者: TC管理员    时间: 2012-12-3 10:03
顶啊
作者: sendmails2me    时间: 2012-12-3 10:04
回复 2楼TC管理员的帖子

管理员好可爱哦~
作者: feng123144    时间: 2012-12-3 11:40
回复 3楼sendmails2me的帖子

怎么个好可爱法?
顶啊,
这个就可爱了?
作者: 袭、羽    时间: 2012-12-3 11:40
没人  指点一下呢
作者: 袭、羽    时间: 2012-12-3 14:10
我那个r  终于解决了




欢迎光临 TC官方合作论坛 (http://bbs.52tc.co/) Powered by Discuz! X3.1