#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 310, 190)
$Button1 = GUICtrlCreateButton("回车键", 112, 56, 75, 25,$BS_DEFPUSHBUTTON)
$Button2 = GUICtrlCreateButton("Button2", 112, 88, 75, 25)
$Button3 = GUICtrlCreateButton("Button3", 112, 120, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MsgBox(0,'','敲键盘上的回车键模拟点击$Button1 按钮功能')
GUICtrlSetState($Button1,256)
Case $Button2
MsgBox(0,'','按钮2')
GUICtrlSetState($Button1,256)
Case $Button3
MsgBox(0,'','按钮3')
GUICtrlSetState($Button1,256)
EndSwitch
WEnd
|