Habe mit einem kleinen Taschenrechner begonnen. Jedoch komme ich beim "=" nicht mehr weiter. Was muss ich da eintippen, damit die Zahlen zusammengerechnet werden und oben als Ergebnis rauskommen? Am besten sollte alles andere überschrieben werden. Also nicht: 5+5=10
Hier das bisherige Script:
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 311, 308, 192, 124)
$Label1 = GUICtrlCreateLabel("", 40, 24, 228, 36)
GUICtrlSetBkColor($Label1, 0xFFFFFF)
GUICtrlSetFont($Label1, 21)
$Button1 = GUICtrlCreateButton("1", 48, 80, 41, 41, $WS_GROUP)
$Button2 = GUICtrlCreateButton("2", 104, 80, 41, 41, $WS_GROUP)
$Button3 = GUICtrlCreateButton("3", 160, 80, 41, 41, $WS_GROUP)
$Button4 = GUICtrlCreateButton("4", 48, 136, 41, 41, $WS_GROUP)
$Button5 = GUICtrlCreateButton("5", 104, 136, 41, 41, $WS_GROUP)
$Button6 = GUICtrlCreateButton("6", 160, 136, 41, 41, $WS_GROUP)
$Button7 = GUICtrlCreateButton("7", 48, 192, 41, 41, $WS_GROUP)
$Button8 = GUICtrlCreateButton("8", 104, 192, 41, 41, $WS_GROUP)
$Button9 = GUICtrlCreateButton("9", 160, 192, 41, 41, $WS_GROUP)
$Button10 = GUICtrlCreateButton("0", 48, 248, 41, 41, $WS_GROUP)
$Button11 = GUICtrlCreateButton("/", 216, 80, 41, 41, $WS_GROUP)
$Button12 = GUICtrlCreateButton("*", 216, 136, 41, 41, $WS_GROUP)
$Button13 = GUICtrlCreateButton("-", 216, 192, 41, 41, $WS_GROUP)
$Button14 = GUICtrlCreateButton("+", 216, 248, 41, 41, $WS_GROUP)
$Button15 = GUICtrlCreateButton(".", 104, 248, 41, 41, $WS_GROUP)
$Button16 = GUICtrlCreateButton("=", 160, 248, 41, 41, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "1")
Case $Button2
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "2")
Case $Button3
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "3")
Case $Button4
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "4")
Case $Button5
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "5")
Case $Button6
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "6")
Case $Button7
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "7")
Case $Button8
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "8")
Case $Button9
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "9")
Case $Button10
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "0")
Case $Button11
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "/")
Case $Button12
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "*")
Case $Button13
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "-")
Case $Button14
GUICtrlSetData($Label1, GUICtrlRead($Label1) & "+")
Case $Button15
GUICtrlSetData($Label1, GUICtrlRead($Label1) & ".")
Case $Button16
;~ Was muss hier rein?
EndSwitch
WEnd
mfG
Charlie
Edit: Hier der fertige Rechner: Klick mich
Charlie