#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 261, 121, 192, 124)
$Input1 = GUICtrlCreateInput("", 8, 8, 121, 21)
$Input2 = GUICtrlCreateInput("", 8, 40, 121, 21)
$Input3 = GUICtrlCreateInput("", 8, 72, 121, 21)
$Button1 = GUICtrlCreateButton("保存", 152, 16, 75, 25)
$Button2 = GUICtrlCreateButton("显示", 152, 56, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $aInputs[4]
$aInputs[0] = 3
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$aInputs[1] = GUICtrlRead($Input1)
$aInputs[2] = GUICtrlRead($Input2)
$aInputs[3] = GUICtrlRead($Input3)
MsgBox(0,0,"保存完成")
Case $Button2
For $i = 1 To 3
MsgBox(0,0,"Input" & $i & "的内容为:" & $aInputs[$i])
Next
EndSwitch
WEnd
|