找回密码
 加入
搜索
查看: 8918|回复: 10

[交流] 如何让GUI接收一个回车键盘点击呢

 火.. [复制链接]
发表于 2011-10-10 01:30:18 | 显示全部楼层 |阅读模式
做了个各程序,输入验证码后按回车继续,我用HotKeySet ( "{enter}","butt" ) 来实现的,但是这个不好用,回车是全局的,影响到了其它。 不知怎么实现让GUI收到这个回车呢 继续现而不影响其它。
发表于 2011-10-10 09:23:41 | 显示全部楼层
先让窗口设置成活动窗口就能发送enter了!
发表于 2011-10-10 09:24:04 | 显示全部楼层
回复 1# ddryao
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 393, 139, 353, 310)
$Input1 = GUICtrlCreateInput("Input1", 10, 10, 219, 21)
$Input2 = GUICtrlCreateInput("在这输入内容按回车才有效哦", 14, 38, 209, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Input2
                        MsgBox(0,"",GUICtrlRead($Input2))
        EndSwitch
WEnd
 楼主| 发表于 2011-10-10 12:45:36 | 显示全部楼层
太感谢 guland  版主了,这个方法可实 不影响到其它。
发表于 2011-10-11 23:35:19 | 显示全部楼层
相当感谢楼主啊!!!
发表于 2011-11-8 21:46:33 | 显示全部楼层
看一下~~~~~~~~支持
发表于 2012-12-20 19:09:19 | 显示全部楼层
支持支持熱烈支持
发表于 2013-1-27 22:42:26 | 显示全部楼层
看一下程序,跑跑看,学习了。
发表于 2013-1-28 00:48:17 | 显示全部楼层
guland  Very Good!~
发表于 2013-8-25 21:59:21 | 显示全部楼层
发送sent ("enter")
发表于 2014-7-14 14:02:58 | 显示全部楼层
感谢,学习,学习,学习。强大
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-27 13:06 , Processed in 0.074099 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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