Global Const $WM_KEYDOWN = 0x0101 $hwd = GUICreate("TEST",300,300) GUIRegisterMsg($WM_KEYDOWN, "WM_KeyDown") ;$OkButton = GUICtrlCreateButton("ok",10,10,20,20) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit EndSwitch WEnd Func WM_KeyDown($HWnd,$iMsg,$wParam,$lParam) MsgBox(0, "", "按键值是: " & BitAND($wParam,0xFF)) EndFunc
举报
您需要 登录 才可以下载或查看,没有账号?加入
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-5-6 17:03 , Processed in 0.118157 second(s), 25 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2025 Discuz! Team.