Hallo,
Ich bräuchte etwas Hilfe wie man 2 variablen, bzw. 2 Labels zusammenzählt.
ich möchte $randomzahl1 und $randomzahl2 zusammenzählen, und ein ergebnis draus machen.
oder $label3 und $label5 zusammenzählen?
wisst ihr wie das geht?
von sowas habe ich leider kene ahnung, und im Internet habe ich danach auch schon gesucht aber nichts gefunden.
lg lufl
Ich bräuchte etwas Hilfe wie man 2 variablen, bzw. 2 Labels zusammenzählt.
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Mathetrainer by Timm v1.0.0", 280, 144, 192, 124)
$Label2 = GUICtrlCreateLabel("", 16, 40, 4, 4)
$Label3 = GUICtrlCreateLabel("zahl", 16, 48, 55, 17)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label4 = GUICtrlCreateLabel("+", 72, 48, 10, 17)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label5 = GUICtrlCreateLabel("zahl", 96, 48, 47, 17)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label6 = GUICtrlCreateLabel("=", 160, 48, 26, 17)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Neue zahl", 16, 72, 113, 17)
$Label1 = GUICtrlCreateLabel("Mathetrainer", 8, 8, 120, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("", 192, 48, 81, 21)
$Button2 = GUICtrlCreateButton("Fertig", 192, 72, 81, 17)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$randomzahl1 = randomzahl1()
GUICtrlSetData($Label3, $randomzahl1)
$randomzahl2 = randomzahl2()
GUICtrlSetData($Label5, $randomzahl2)
EndSwitch
WEnd
Func randomzahl1()
Return Random(1, 100, 1)
EndFunc ;==>randomzahl1
Func randomzahl2()
Return Random(1, 100, 1)
EndFunc ;==>randomzahl1
oder $label3 und $label5 zusammenzählen?
wisst ihr wie das geht?
von sowas habe ich leider kene ahnung, und im Internet habe ich danach auch schon gesucht aber nichts gefunden.
lg lufl