TC官方合作论坛

 找回密码
 立即注册
查看: 5521|回复: 10

[游戏] 【有源码】万能多窗体同步

[复制链接]
发表于 2012-2-25 19:51:56 | 显示全部楼层 |阅读模式

马上加入TC

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

#include"varlist.t"
namespace 多窗体同步
dm=com("dm.dmsoft")
hwnd,keycode
//********************************//
//***********线程任务**************//
//********************************//
function beginsomething()
//多窗体同步.register()  //注册绑定
help.messagebox(convert.inttostr(keycode))
    while(true)
        k=keyboard.waitkey()
        help.sleep(100)
        if(k!=118)
          // dm.KeyPress(k)
          超级键盘.按键(k,10)
           help.sleep(20)
        endif
    endwhile
return true
endfunction
//********************************//
//***********开始按钮**************//
//********************************//
function start_click()
while (true)
  keycode=keyboard.waitkey()
                help.sleep(500)
                if(keycode==118)
   //hwnd=dm.GetMousePointWindow()
                        window.getmousemovewndhand()   
                        h=thread.beginthread("多窗体同步.beginsomething")
   varlist.addstr(h)
                else
                    多窗体同步.beginsomething()
  endif
endwhile
return true
endfunction
//********************************//
//***********退出按钮**************//
//********************************//
function exit_click()
//多窗体同步.free()
   多窗体同步.closeThead()
help.exit()
return true
endfunction
//********************************//
//********注册绑定*********//
//********************************//
function register()
    dm_ret = dm.BindWindow(hwnd,"dx","dx","dx",0)
    help.sleep(20)
    if (dm_ret==0)
        help.messagebox("大漠绑定失败")
        help.exit()
    endif
return true
endfunction
//********************************//
//********大漠解除绑定*********//
//********************************//
function free()
  // dm.UnBindWindow()
   help.sleep(500)
return true
endfunction
//********************************//
//********窗体销毁方法*********//
//********************************//
function destroy()
多窗体同步.exit_click()
return true
endfunction
//********************************//
//********关闭多线程*********//
//********************************//
function closeThead()
str=varlist.returnstr()
wz
  while(true)
   wz=str.findstr(str,"|")
                        thread.closethread(str.strsub(str,0,wz))
                        help.sleep(200)
   if (wz==-1)
    break
   else
    str=str.strcut(str,wz+1,true)
   endif
  endwhile
return true
endfunction

endnamespace

回复

使用道具 举报

发表于 2012-2-25 19:54:23 | 显示全部楼层
很好很强大,鼠标部分呢,有便捷的调用么
回复 支持 反对

使用道具 举报

发表于 2012-7-19 11:19:27 | 显示全部楼层
好象是键盘,没鼠标啊
回复 支持 反对

使用道具 举报

发表于 2012-9-2 17:22:38 | 显示全部楼层
学习
回复 支持 反对

使用道具 举报

发表于 2012-9-23 10:41:04 | 显示全部楼层
学习
回复 支持 反对

使用道具 举报

发表于 2012-9-24 11:52:28 | 显示全部楼层
请教 复制粘贴大法 有效果吗
回复 支持 反对

使用道具 举报

发表于 2012-10-7 11:57:11 | 显示全部楼层
能发个 鼠标的就好了 ,期待中..............................
回复 支持 反对

使用道具 举报

发表于 2012-11-11 00:06:32 | 显示全部楼层
4111111
回复 支持 反对

使用道具 举报

发表于 2014-3-26 01:31:41 | 显示全部楼层
总算看到一个
回复 支持 反对

使用道具 举报

发表于 2014-6-3 02:22:10 | 显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条

关闭

小黑屋|TC官方合作论坛 (苏ICP备18045623号)

GMT+8, 2024-5-19 05:04 , Processed in 0.039881 second(s), 22 queries .

Powered by 海安简单软件服务部

© 2008-2019 版权所有 保留所有权利

快速回复 返回顶部 返回列表