For Schleife funktioniert nicht

  • HI :)

    [autoit]

    msgbox(0,"","YOLO0")
    for $i=1 To $i > $votes
    msgbox(0,"","YOLO1")
    _vote($proxys[$i])
    Next
    msgbox(0,"","YOLO2")

    [/autoit]


    Ich möchte eine msgbox öffnen, und dann so oft die funktion _vote($proxys[$i]) so oft aufrufen, wie es in der variabel $votes steht.
    msgbox "YOLO0 kommt.
    dann passiert erstmal nix, und dann kommt msgbox YOLO2.
    checke nicht, wieso :o

    Einmal editiert, zuletzt von v1Dr333s (3. April 2013 um 22:40)

  • ganz einfach :D

    [autoit]

    msgbox(0,"","YOLO0")
    for $i=1 To $votes ; Hier war der Fehler, erklärt sich selbst, wenn nicht --> Hilfe
    msgbox(0,"","YOLO1")
    _vote($proxys[$i])
    Next
    msgbox(0,"","YOLO2")

    [/autoit]
  • Zitat
    [autoit]


    $i > $votes

    [/autoit]

    Das ist kein C++/Java whatever.^^
    Der AutoIt-Syntax sieht so aus:

    [autoit]


    For <Variable> = <Startwert> To <Endwert> Step <Schrittgröße>

    [/autoit]

    C++:

    Code
    for(<Variable> = <Startwert>; <Bedingung>; <Aktion pro Durchlauf>)

    lg