如何知道input控件中某个键被按下(已解决)
本帖最后由 welsn 于 2014-5-18 12:14 编辑请问:input控件中输入一串字符后按下ENTER键,请问如何判断这个ENTER被按下了(是在input输入中按下的,而不是在其他情况下按下) #include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 287, 155, 192, 124)
$Input1 = GUICtrlCreateInput("", 40, 32, 201, 21)
$Button1 = GUICtrlCreateButton("ok", 96, 88, 81, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Input1 ;要改变内容再按下
MsgBox(64,"提示","你按下了回车键")
EndSwitch
WEnd
感谢居士..... 感谢,噶写,学习了,顺便露个脸
页:
[1]