我只能做成这样的 你试试 功能大体上是一样的#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 661, 361)
$Edit1 = GUICtrlCreateEdit("", 8, 8, 177, 65)
GUICtrlSetData(-1, "7201")
$Button1 = GUICtrlCreateButton("+100", 192, 8, 121, 25)
$Button2 = GUICtrlCreateButton("-100", 192, 40, 121, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $jia, $jian
$duqu = GUICtrlRead($Edit1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_jia()
Case $Button2
_jian()
EndSwitch
WEnd
Func _jia()
$jia = $duqu + 100
GUICtrlSetData($Edit1, $jia)
$duqu = GUICtrlRead($Edit1)
EndFunc
Func _jian()
$jian = $duqu - 100
GUICtrlSetData($Edit1, $jian)
$duqu = GUICtrlRead($Edit1)
EndFunc
|