Bestimmter StringSplit / Hilfe wäre freundlich

  • poste des doch mal bitte übersichtlich... und nicht alles in 2 zeilen geklatscht

    [autoit]


    dim $nutzer[1],$passwords[1]
    $input = Controlgettext("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.RichEdit20W.app.0.378734a; INSTANCE:1]")

    [/autoit][autoit][/autoit][autoit]

    sort()

    [/autoit][autoit][/autoit][autoit]

    ControlClick("Shinoby´s gamesupporter", "", "[CLASS:Edit; INSTANCE:1]")

    [/autoit][autoit][/autoit][autoit]

    for $i = 1 to $nutzer[0]
    send($nutzer[$i]&" "&$Passwords[$i]&@crlf)
    Next

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]

    func sort()
    $string = StringReplace($input,@crlf," ")
    $array = StringSplit($string," ")
    msgbox(0,"a","insgesammt: "&$array[0]/2&" Nutzer") ; als check ^^
    global $nutzer[$array[0]/2+1] ; legt größe der array fest
    global $passwords[$array[0]/2+1] ; legt größe der array fest
    $nutzer[0] = $array[0]/2 ; setzt das element 0 auf die anzahl der einträge
    $passwords[0] = $array[0]/2 ; setzt das element 0 auf die anzahl der einträge

    $b = 0
    for $i = 1 to $array[0] step +2
    $b = $b + 1
    $nutzer[$b] = $array[$i]
    Next

    [/autoit][autoit][/autoit][autoit]

    $b = 0
    for $i = 2 to $array[0] step +2
    $b = $b + 1
    $passwords[$b] = $array[$i]
    Next

    EndFunc

    [/autoit]

    2 Mal editiert, zuletzt von azunai (1. August 2008 um 14:20)

  • [autoit]

    AutoItSetOption("MouseCoordMode", 0)
    Winactivate("Shinoby´s gamesupporter", "")
    WinWaitActive("Shinoby´s gamesupporter","")

    [/autoit][autoit][/autoit][autoit]

    ;KONTROLLBOXEN CHECKEN, WELCHE AKTIVIERT UND WELCHE DEAKTIVIERT SIND!
    $1990 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:3]", "IsChecked", "" )
    $1991 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:4]", "IsChecked", "" )
    $1992 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:5]", "IsChecked", "" )
    $1993 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:6]", "IsChecked", "" )
    $1994 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:7]", "IsChecked", "" )
    $1995 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:8]", "IsChecked", "" )
    $1996 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:9]", "IsChecked", "" )
    $1997 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:10]", "IsChecked", "" )
    $1998 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:11]", "IsChecked", "" )
    $1999 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:12]", "IsChecked", "" )
    $2000 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:13]", "IsChecked", "" )
    $2001 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:14]", "IsChecked", "" )
    $2002 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:15]", "IsChecked", "" )
    $2003 = ControlCommand("Shinoby´s gamesupporter", "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:16]", "IsChecked", "" )
    ;ENDE KONTROLLBOXEN CHECKEN
    ;INPUTSPLITTEN
    $input = Controlgettext(""Shinoby´s gamesupporter"", "", "[CLASS:WindowsForms10.RichEdit20W.app.0.378734a; INSTANCE:1]")
    sort()

    [/autoit][autoit][/autoit][autoit]

    ControlClick(""Shinoby´s gamesupporter"", "", "[CLASS:Edit; INSTANCE:1]")
    for $i = 1 to $nutzer[0]
    ;send($nutzer[$i]&" "&$Passwords[$i]&@crlf)
    send($passwords[1])
    Next

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]

    If $1990 = 1 then
    Endif
    If $1991= 1 Then
    Endif
    If $1992 = 1 then
    Endif
    If $1993 = 1 then
    Endif
    If $1994 = 1 then
    Endif
    If $1995 = 1 then
    Endif
    If $1996 = 1 then
    Endif
    If $1997 = 1 then
    Endif
    If $1998 = 1 then
    Endif
    If $1999 = 1 then
    Endif
    If $2000 = 1 then
    Endif
    If $2001 = 1 then
    Endif
    If $2002 = 1 then
    Endif
    If $2003 = 1 then
    Endif

    [/autoit][autoit][/autoit][autoit]

    func sort()
    $string = StringReplace($input,@crlf," ")
    $array = StringSplit($string," ")
    msgbox(0,"a","insgesammt: "&$array[0]/2&" Nutzer") ; als check ^^
    global $nutzer[$array[0]/2+1] ; legt größe der array fest
    global $passwords[$array[0]/2+1] ; legt größe der array fest
    $nutzer[0] = $array[0]/2 ; setzt das element 0 auf die anzahl der einträge
    $passwords[0] = $array[0]/2 ; setzt das element 0 auf die anzahl der einträge

    [/autoit][autoit][/autoit][autoit]

    $b = 0
    for $i = 1 to $array[0] step +2
    $b = $b + 1
    $nutzer[$b] = $array[$i]
    Next

    [/autoit][autoit][/autoit][autoit]

    $b = 0
    for $i = 2 to $array[0] step +2
    $b = $b + 1
    $passwords[$b] = $array[$i]
    Next

    [/autoit][autoit][/autoit][autoit]

    EndFunc

    [/autoit]