Hi liebe Com,
ich hab mir gedacht ich mach einen Namegenerator, also hab ich mir gedacht ich mach das so dass die Namen so generiert werden:
Vokal - Konsonant - Vokal - Konsonant - Konsonant
Also hab ich die Variablen $1, $2 & $3 deklariert (weitere später, wollte erst sehen obs hinhaut), und per Random und If Funktion festgelegt, dass per Zufall halt ein Vokal bzw. Konsonant ausgewählt wird und in einer neuen Variable abgespeichert wird (bei $1 dann in $11), doch das haut nicht hin >.<. Bitte um Hilfe, hier das Script.
[autoit]#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 242, 160, 192, 124)
$Label1 = GUICtrlCreateLabel("Dein Nickname:", 16, 16, 119, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Book Antiqua")
$Label2 = GUICtrlCreateLabel("Muster", 138, 16, 48, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Book Antiqua")
$Radio1 = GUICtrlCreateRadio(" männliche Namen", 24, 40, 169, 25)
$Radio2 = GUICtrlCreateRadio(" weibliche Namen", 24, 66, 169, 25)
$Button1 = GUICtrlCreateButton("Generate", 16, 96, 105, 25, 0)
$Button2 = GUICtrlCreateButton("Namen Speichern", 120, 96, 105, 25, 0)
$Button3 = GUICtrlCreateButton("Beenden", 16, 120, 209, 25, 0)
$Group1 = GUICtrlCreateGroup("Group1", 8, 2, 225, 151)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$1 = Random(1, 5)
$2 = Random(1, 25)
$3 = Random(1, 5)
$4 = Random(1, 25)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If $1 = 1 Then $11 = "A"
If $1 = 2 Then $11 = "E"
If $1 = 3 Then $11 = "I"
If $1 = 4 Then $11 = "O"
If $1 = 5 Then $11 = "U"
GUICtrlSetData($Label2, $11)
EndSwitch
WEnd