[Visual Basic] [Problem] String auslesen/String zufällig wählen

05/06/2012 17:14 Beatsu#1
Code:
PHP Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Name Generator", 236, 299, 815, 246)
$Input1 = GUICtrlCreateInput("Username", 24, 72, 185, 21)
$Input2 = GUICtrlCreateInput("Username", 24, 104, 185, 21)
$Input3 = GUICtrlCreateInput("Username", 24, 136, 185, 21)
$Input4 = GUICtrlCreateInput("Username", 24, 168, 185, 21)
$Input5 = GUICtrlCreateInput("Username", 24, 200, 185, 21)
$Input6 = GUICtrlCreateInput("Username", 24, 232, 185, 21)
$Name = GUICtrlCreateLabel("Name Generator [06.05.12]", 24, 16, 300, 26)
GUICtrlSetFont(-1, 10, 800, 0, "Prestige Elite Std")
$Button1 = GUICtrlCreateButton("Losuj", 40, 264, 57, 25, 0)
$Button2 = GUICtrlCreateButton("Reset", 128, 264, 57, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
= GUIGetMsg()
    Switch 
$nMsg
 
Case $GUI_EVENT_CLOSE
            
Exit
         
    EndSwitch
WEnd 
Problem: Wie kann ich einen String auslesen und einen String zufällig wählen
05/06/2012 17:56 xTenzo#2
Das ist AutoIt
05/06/2012 18:56 Beatsu#3
Sry ich meine es auch in AutoIt. Hab mich verschrieben
05/06/2012 19:15 xNopex#4
Jetzt wissen die nichmal mehr in welcher Sprache sie C&Pen :(
05/06/2012 19:43 Freddy​#5
PHP Code:
$Zeichen = StringSplit("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890","")
$String = ""
For $i = 1 To 20
   $String 
&= $Zeichen[Random(1,UBound($Zeichen)-1)]
Next
MsgBox 
(0,"",$String) 
So zB