Sry :)
Danke eddy so meinte ich eig net . Bin ja noch nicht so lange bei autoit :)
Danke eddy so meinte ich eig net . Bin ja noch nicht so lange bei autoit :)
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;// Variablen
$Count = 0
;// Gui
$Gui = GUICreate("Zähler", 163, 130, 192, 124, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
GUISetFont(12, 400, 0, "MS Sans Serif")
GUISetBkColor(0xFFFFFF)
$sCount = GUICtrlCreateLabel( $Count, 7, 8, 149, 24, $SS_CENTER)
$Add = GUICtrlCreateButton("+ 1", 5, 40, 41, 33)
$Take = GUICtrlCreateButton("- 1", 112, 40, 41, 33)
$Reset = GUICtrlCreateButton("Auf 0 Setzen!", 9, 88, 145, 33)
GUISetState(@SW_SHOW)
;// Script
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Add
GUICtrlSetData ($sCount, $Count = $Count + 1)
Case $Take
GUICtrlSetData ($sCount, $Count = $Count - 1)
Case $Reset
GUICtrlSetData ($sCount, $Count = 0)
EndSwitch
WEnd ;==> Script
GUICtrlSetDate (§sCount, $Count = 0)
GUICtrlSetData (§sCount, GUICtrlRead($sCount) + 1) GUICtrlSetData (§sCount, 0)