|
我是 新手,本来是想做一个后台自动喊话脚本,但是不知为什么,一旦窗口不是顶层窗口或者窗口未激活都不能够实现自动喊话,循环代码如下,哪位大神帮忙解决一下撒,谢谢!!
function threadfun()
while(1)
if(hwnd>0)
//window.setfocus(hwnd)
//help.setclip("aa")
window.sendmessage(hwnd,256,13,0)
help.sleep(10)
window.sendmessage(hwnd,257,13,0)
// window.sendkeypress(hwnd,13)
window.sendstring(hwnd,edit.gettext("edit0"),0)
help.sleep(2000)
window.sendmessage(hwnd,256,13,0)
help.sleep(10)
window.sendmessage(hwnd,257,13,0)
// window.sendkeypress(hwnd,13)
help.sleep(2000)
else
help.messagebox("没有找到窗口句柄")
endif
endwhile
endfunction
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|