Hallo community,
ich habe hier ein problem:
ich möchte einen mathe trainer erstellen, und will das label wo die zahl drinne steht, mit guictrlsetdata ein random per variable einbauen, dies klappt aber nicht.
könnt ihr mir sagen welchen Fehler ich gemacht habe?
lg Lufl
ich habe hier ein problem:
ich möchte einen mathe trainer erstellen, und will das label wo die zahl drinne steht, mit guictrlsetdata ein random per variable einbauen, dies klappt aber nicht.
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("Form1", 279, 143, 192, 124)
$Label1 = GUICtrlCreateLabel("", 16, 16, 61, 17)
$Label2 = GUICtrlCreateLabel("", 16, 40, 4, 4)
$Label3 = GUICtrlCreateLabel("zahl", 16, 40, 23, 17)
$Label4 = GUICtrlCreateLabel("+", 48, 40, 10, 17)
$Label5 = GUICtrlCreateLabel("zahl", 64, 40, 23, 17)
$Label6 = GUICtrlCreateLabel("=", 88, 40, 10, 17)
$Button1 = GUICtrlCreateButton("Button1", 40, 72, 161, 57)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Label3,$randomzahl1())
EndSwitch
WEnd
Func randomzah1()
Random(1,100,1)
EndFunc
lg Lufl