Hi,
ist es möglich, das wenn ich auf einen Button in einer GUI klicke, + 1 dazu gerechnet wird und es dann auch angezeigt wird?
Also quasi wenn jedesmal der Button angeklickt wird, rechnet sich das Label eins höher.
Habe es so versucht:
[autoit]
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$zahl = "0"
$Form1 = GUICreate("Form1", 221, 334, 193, 125)
$Group1 = GUICtrlCreateGroup("Group1", 32, 16, 161, 81)
$Label1 = GUICtrlCreateLabel($zahl, 48, 32, 36, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("add", 16, 128, 177, 41, 0)
GUICtrlSetOnEvent($Button1,"_add1")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Func _add1()
$zahl = $zahl + 1
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Jemand ne Ahnung?