第四课 511遇见易语言大漠后台模式判断

1、后台识别绑定游戏窗口

句柄获取:
hwnd = dm.GetMousePointWindow()
hwnd = dm.FindWindow (“”, “剑侠情缘•网络版”)
绑定窗口:
long BindWindow(hwnd,display,mouse,keypad,mode)
示例:

 
// display: 前台 鼠标:前台键盘:前台 模式0
dm_ret = dm.BindWindow(hwnd,"normal","normal","normal",0)
// display: gdi 鼠标:前台 键盘:前台 模式1
dm_ret = dm.BindWindow(hwnd,"gdi","normal","normal",1)
// display: dx 鼠标:前台 键盘:前台 模式0
dm_ret = dm.BindWindow(hwnd,"dx","normal","normal",0)
// display: dx 鼠标:windows后台 键盘:windows后台 模式1
dm_ret = dm.BindWindow(hwnd,"dx","windows","windows",1)
// display: dx 鼠标:dx 后台 键盘: dx后台 模式1
dm_ret = dm.BindWindow(hwnd,"dx","dx","dx",1) 
// display: dx 鼠标:windows3后台 键盘:windows后台 模式1
dm_ret = dm.BindWindow(hwnd,"dx","windows3","windows",1)
后台模式判断:dm_ret = dm.Capture(0,0,2000,2000,"screen.bmp")
解除绑定:dm_ret = dm.UnBindWindow()


发布日期:

所属分类: 易语言 标签: