1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. VinceA

Beiträge von VinceA

  • Listview checked items in Ini speichern

    • VinceA
    • 10. Mai 2013 um 15:25

    Hi Leute
    Ich versuche die im Listview checked Items in eine Ini zu speichern aber leider klappt es nicht so wie ich es will.

    Meine Versuche

    Spoiler anzeigen
    [autoit]

    $sOut2 = ''
    For $i = 0 To _GUICtrlListView_GetItemCount($ListView1) - 1
    If _GUICtrlListView_GetItemChecked($ListView1, $i) Then _
    $sOut2 = _GUICtrlListView_GetItemText($ListView1, $i, 0)
    IniWrite(@ScriptDir&"\Maps.ini", "Section", "key",$sOut2 ))

    [/autoit]


    Die Ini sieht dann so aus...

    Spoiler anzeigen

    [Section]
    key=castillos_rocky_2881603500334490387.fc2map


    und wenn ich es so mache...

    Spoiler anzeigen
    [autoit]

    IniWrite(@ScriptDir & "\Maps.ini", "Section", $i, $sOut2)

    [/autoit]


    sieht es so aus.

    Spoiler anzeigen

    [Section]
    0=AR-16_Rumik - Pac!ent_2921486164596879929.fc2map
    1=Avatar sniper_PcsKiller_2307221835651582756.fc2map
    2=B32 SNIPER CLIFF ( NO CROSS )_PCS KILLER_3414014144499745551.fc2map
    3=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    4=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    5=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    6=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    7=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    8=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    9=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    10=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    11=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    12=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    13=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    14=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    15=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    16=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    17=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    18=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    19=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    20=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    21=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    22=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    23=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    24=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    25=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    26=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    27=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    28=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    29=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    30=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map
    31=B32 Tower war ( NO CROSS )_pcs killer_2377096040381240610.fc2map


    Wie kann ich erreichen das nur die checked items in die Ini geschrieben werden?
    Ist das überhaupt realisierbar?

  • StdoutRead auslesen per Button

    • VinceA
    • 19. April 2013 um 21:51

    Tip Top es funktioniert.

    Vielen Dank für die schnelle Hilfe

  • StdoutRead auslesen per Button

    • VinceA
    • 18. April 2013 um 20:03

    :) Super mit AdLibRegister hat es geklappt aber leider startet der Server Launcher bevor ich den Button1 gedrückt habe. :(

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Constants.au3>
    #include <GuiEdit.au3>

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

    #region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 835, 439, 192, 124)
    $Button1 = GUICtrlCreateButton("Button1", 26, 28, 75, 25)
    $Edit1 = GUICtrlCreateEdit("", 419, 29, 398, 387)
    $Edit2 = GUICtrlCreateEdit("", 15, 215, 398, 200)
    $Button2 = GUICtrlCreateButton("Button2", 151, 60, 75, 25)
    $Input1 = GUICtrlCreateInput("", 149, 30, 222, 21)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    $fc2 = Run("C:\Program Files (x86)\Ubisoft\Far Cry 2\bin\FC2ServerLauncher.exe", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    Case $Button1
    Start()

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

    Case $Button2
    $read = GUICtrlRead($Input1)
    WinActivate("[Class:ConsoleWindowClass]")
    WinWaitActive("[Class:ConsoleWindowClass]")
    Send($read & "{Enter}")
    EndSwitch

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

    WEnd

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

    Func Start()
    AdlibRegister("Start")

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

    $line = StdoutRead($fc2)
    If @error Then Exit
    If $line <> "" Then
    GUICtrlSetData($Edit1, "" & $line, 1)
    EndIf
    $line = StderrRead($fc2)
    If @error Then Exit
    ;~ ConsoleWrite("STDERR read:" & $line & 1)

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

    EndFunc ;==>Start

    [/autoit]

    Wie kann ich vehindern dass das Programm startet bevor ich Button1 geklickt habe?

    http://translation.autoit.de/onlinehilfe/fu…libRegister.htm

  • StdoutRead auslesen per Button

    • VinceA
    • 17. April 2013 um 21:21

    Ok den 1. Script hab ich korrigiert.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Constants.au3>
    #include <GuiEdit.au3>
    #region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 835, 439, 192, 124)
    $Edit1 = GUICtrlCreateEdit("", 419, 29, 398, 387)
    $Edit2 = GUICtrlCreateEdit("", 15, 215, 398, 200)
    $Button1 = GUICtrlCreateButton("Senden", 151, 60, 75, 25)
    $Input1 = GUICtrlCreateInput("", 149, 30, 222, 21)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    $fc2 = Run("C:\Program Files (x86)\Ubisoft\Far Cry 2\bis\FC2ServerLauncher.exe", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    Case $Button1
    $read = GUICtrlRead($Input1)
    WinActivate("[Class:ConsoleWindowClass]")
    WinWaitActive("[Class:ConsoleWindowClass]")
    Send($read & "{Enter}")

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

    EndSwitch

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

    $line = StdoutRead($fc2)
    If @error Then ExitLoop
    If $line <> "" Then
    GUICtrlSetData($Edit1, "" & $line, 1)

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

    EndIf
    $line = StderrRead($fc2)
    If @error Then ExitLoop
    ;~ ConsoleWrite("STDERR read:" & $line & 1)
    WEnd

    [/autoit]


    Beim 2. Script habe ich jetzt folgendes probiert.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Constants.au3>
    #include <GuiEdit.au3>
    #region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 835, 439, 192, 124)
    $Button1 = GUICtrlCreateButton("Button1", 26, 28, 75, 25)
    $Edit1 = GUICtrlCreateEdit("", 419, 29, 398, 387)
    $Edit2 = GUICtrlCreateEdit("", 15, 215, 398, 200)
    $Button2 = GUICtrlCreateButton("Button2", 151, 60, 75, 25)
    $Input1 = GUICtrlCreateInput("", 149, 30, 222, 21)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    $fc2 = Run("C:\Program Files (x86)\Ubisoft\Far Cry 2\bin\FC2ServerLauncher.exe", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    Start()

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

    Case $Button2
    $read = GUICtrlRead($Input1)
    WinActivate("[Class:ConsoleWindowClass]")
    WinWaitActive("[Class:ConsoleWindowClass]")
    Send($read & "{Enter}")
    EndSwitch

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

    WEnd

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

    Func Start()

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

    $line = StdoutRead($fc2)
    If @error Then Exit
    If $line <> "" Then
    GUICtrlSetData($Edit1, "" & $line, "")
    EndIf
    $line = StderrRead($fc2)
    If @error Then Exit
    ;~ ConsoleWrite("STDERR read:" & $line & 1)

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

    EndFunc ;==>Start

    [/autoit]


    Aber leider funktioniert es nicht so wie ich es wollte.
    Ich kann mit Button1 den StdoutRead Prozess starten aber leider muss ich den Button 3 mal drücken bis er alles ausgelesen hat. Button 2 funktioniert, kann befehle senden aber auch hier muss ich aber dann Button 1 drücken damit ich es in Edit1 sehen kann.
    Was kann ich machen das wenn ich auf den Button1 klicke, der StdoutRead Prozess endlos ausliest bis ich das Programm schliesse?

  • StdoutRead auslesen per Button

    • VinceA
    • 17. April 2013 um 16:31

    Hi
    wenn ich meine Giu starte beginnt der StdoutRead sofort den FCsServerLauncher auszulesen, kann dann im Input einen Befehl eingeben und senden.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Constants.au3>
    #include <GuiEdit.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 835, 439, 192, 124)
    $Edit1 = GUICtrlCreateEdit("", 419, 29, 398, 387)
    $Edit2 = GUICtrlCreateEdit("", 15, 215, 398, 200)
    $Button1 = GUICtrlCreateButton("Senden", 151, 60, 75, 25)
    $Input1 = GUICtrlCreateInput("", 149, 30, 222, 21)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    $fc2 = Run("C:\Program Files (x86)\Ubisoft\Far Cry 2\bin\FC2ServerLauncher.exe", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD )

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    Case $Button1
    $read = GUICtrlRead($Input1)
    WinActivate("[Class:ConsoleWindowClass]")
    WinWaitActive ("[Class:ConsoleWindowClass]")
    Send($read&"{Enter}")

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

    EndSwitch

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

    $line = StdoutRead($fc2)
    If @error Then ExitLoop
    If $line <> "" Then
    GUICtrlSetData($Edit1,"" & $line,1 )

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

    EndIf
    WEnd
    While 1
    $line = StderrRead($fc2)
    If @error Then ExitLoop
    ConsoleWrite("STDERR read:"& $line&1)
    WEnd

    [/autoit]


    Nun habe ich versucht den StdoutRead Prozess auch per Button zu starten, hab ich zwar geschafft aber leider funktioniert der Send Button nicht mehr, kann keine Befehle mehr senden.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Constants.au3>
    #include <GuiEdit.au3>
    #region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 835, 439, 192, 124)
    $Button1 = GUICtrlCreateButton("Button1", 26, 28, 75, 25)
    $Edit1 = GUICtrlCreateEdit("", 419, 29, 398, 387)
    $Edit2 = GUICtrlCreateEdit("", 15, 215, 398, 200)
    $Button2 = GUICtrlCreateButton("Button2", 151, 60, 75, 25)
    $Input1 = GUICtrlCreateInput("", 149, 30, 222, 21)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    Start()

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

    Case $Button2
    $read = GUICtrlRead($Input1)
    WinActivate("[Class:ConsoleWindowClass]")
    WinWaitActive("[Class:ConsoleWindowClass]")
    Send($read & "{Enter}")
    EndSwitch

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

    WEnd

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

    Func Start()
    $fc2 = Run("C:\Program Files (x86)\Ubisoft\Far Cry 2\bin\FC2ServerLauncher.exe", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

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

    While 1
    $line = StdoutRead($fc2)
    If @error Then ExitLoop
    If $line <> "" Then
    GUICtrlSetData($Edit1, "" & $line, 1)

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

    EndIf
    WEnd
    EndFunc ;==>Start

    [/autoit]


    Was mache ich falsch?

  • Befehle senden und Ergebnis in Edit schreiben

    • VinceA
    • 26. März 2013 um 12:10

    @Make-Grafik

    Ok jetzt ist der Groschen gefallen.
    Ich konnte zuerts nicht viel damit anfangen, hab mich dann hier im Forum und google schlau gemacht.


    :thumbup: Danke für den Tip

  • Befehle senden und Ergebnis in Edit schreiben

    • VinceA
    • 25. März 2013 um 16:36

    Ich versteh nicht was du meinst, kannst du es mir vielleicht mit einem code Beispiel erklären?

  • Befehle senden und Ergebnis in Edit schreiben

    • VinceA
    • 25. März 2013 um 01:36

    Hi,
    Ich arbeite an einem Admin Tool.
    Das Konsolen Fenster wird per StdoutRead ausgelesen und in Edit 1 geschrieben, in Input 1 wird ein Befehl geschrieben und per Button an das Konsolen Programm gesendet.
    Zum Beispiel sende ich say hello, kommt der befehl in Edit1 so an:Game message: Anonymous (All): hello
    Nun, meine Frage ist: Wie kann ich wenn der Befehl ausgeführt wurde das Ergebnis in Edit2 schreiben?
    Ich habe vieles ausprobiert und getestet, konnte aber keine Lösung finden.

    [Blockierte Grafik: http://s19.postimg.org/56g62hglr/Server_launcher_pic.jpg]


    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Constants.au3>
    #include <GuiEdit.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 835, 439, 192, 124)
    $Edit1 = GUICtrlCreateEdit("", 419, 29, 398, 387)
    GUICtrlSetData(-1, "line")
    $Edit2 = GUICtrlCreateEdit("", 15, 215, 398, 200)
    $Button1 = GUICtrlCreateButton("Button2", 151, 60, 75, 25)
    $Input1 = GUICtrlCreateInput("", 149, 30, 222, 21)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    $fc = Run("C:\Program Files (x86)\Ubisoft\Far Cry 2\bin\FC2ServerLauncher.exe", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $i = GUICtrlRead($Input1)
    WinActivate("[Class:ConsoleWindowClass]")
    WinWaitActive ("[Class:ConsoleWindowClass]")
    Send($i &"{Enter}")

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

    EndSwitch

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

    $line = StdoutRead($fc)
    If @error Then ExitLoop
    If $line <> "" Then
    GUICtrlSetData($Edit1,"" & $line,1 )

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

    EndIf
    WEnd
    While 1
    $line = StderrRead($fc)
    If @error Then ExitLoop
    ConsoleWrite("STDERR read:"& $line)
    WEnd

    [/autoit]
  • Combox auslesen und in Edit anderen wert schreiben.

    • VinceA
    • 24. Februar 2013 um 18:11

    Vielen dank fü die schnelle Hilfe.
    Ich habe beide Methoden ausprobiert, Tip Top.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section
    $Form2 = GUICreate("FC2 Server Settings", 604, 646, 250, 133)
    $Edit1 = GUICtrlCreateEdit("", 257, 442, 334, 154, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY), $WS_EX_STATICEDGE)
    GUICtrlSetData(-1, "")
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $Input1 = GUICtrlCreateInput("", 3, 33, 219, 21)
    $Combo1 = GUICtrlCreateCombo("", 100, 76, 121, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
    GUICtrlSetData(-1, "Deathmatch|TeamDeathmatch|Uprising|Capture The Diamonds")
    $Label1 = GUICtrlCreateLabel("Server Name", 4, 11, 66, 17)
    GUICtrlSetTip(-1, "maximum of 32 characters (single-byte)")
    $Label2 = GUICtrlCreateLabel("Game Mode", 4, 80, 62, 17)
    $Label3 = GUICtrlCreateLabel("Network Type", 4, 108, 71, 17)
    $Combo2 = GUICtrlCreateCombo("", 100, 103, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Online|LAN")
    $Label19 = GUICtrlCreateLabel("Admin Password", 4, 556, 82, 17)
    $Label5 = GUICtrlCreateLabel("Hardcore Mode", 4, 164, 78, 17)
    $Label17 = GUICtrlCreateLabel("Max Score", 4, 500, 55, 17)
    $Label8 = GUICtrlCreateLabel("Allow Voting", 4, 248, 62, 17)
    $Label7 = GUICtrlCreateLabel("Start Rank", 4, 223, 55, 17)
    $Label20 = GUICtrlCreateLabel("Time Of Day", 4, 584, 63, 17)
    $Label21 = GUICtrlCreateLabel("Wheather Type", 4, 612, 78, 17)
    $Combo4 = GUICtrlCreateCombo("", 100, 160, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Combo15 = GUICtrlCreateCombo("", 100, 496, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "0|5|10|15|20|25|20|40|50|100|200")
    $Combo7 = GUICtrlCreateCombo("", 100, 244, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Combo6 = GUICtrlCreateCombo("", 100, 216, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|45|16|17|18|19")
    $Combo17 = GUICtrlCreateCombo("", 100, 581, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "MapDefault|Random|Dawn|Midday|Dusk|Night")
    $Combo18 = GUICtrlCreateCombo("", 100, 608, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Clear|Windy|Varied|Overcast|Stormy|Random")
    $Combo13 = GUICtrlCreateCombo("", 100, 440, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Combo14 = GUICtrlCreateCombo("", 98, 467, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Infinite|5min|10min|15min|20min|25min|30min|60min")
    $Combo5 = GUICtrlCreateCombo("", 100, 188, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Combo8 = GUICtrlCreateCombo("", 100, 300, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16")
    $Combo9 = GUICtrlCreateCombo("", 100, 329, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16")
    $Combo16 = GUICtrlCreateCombo("", 100, 524, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Detect public IP|Use local IP")
    $Label15 = GUICtrlCreateLabel("Join In Progress", 4, 444, 79, 17)
    $Label16 = GUICtrlCreateLabel("Round Time", 4, 472, 62, 17)
    $Label6 = GUICtrlCreateLabel("Punk Buster", 4, 192, 62, 17)
    $Label10 = GUICtrlCreateLabel("Minimum Players", 4, 304, 82, 17)
    $Label11 = GUICtrlCreateLabel("Maximum Players", 4, 332, 85, 17)
    $Label18 = GUICtrlCreateLabel("Detect Address", 4, 528, 80, 17)
    $Label4 = GUICtrlCreateLabel("Ranked Match", 4, 136, 75, 17)
    $Combo3 = GUICtrlCreateCombo("", 100, 132, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Label12 = GUICtrlCreateLabel("TeamBalance", 4, 360, 70, 17)
    $Combo10 = GUICtrlCreateCombo("", 100, 356, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Label13 = GUICtrlCreateLabel("TeamSwap", 4, 388, 58, 17)
    $Combo11 = GUICtrlCreateCombo("", 100, 384, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Label14 = GUICtrlCreateLabel("Friendly Fire", 4, 416, 60, 17)
    $Combo12 = GUICtrlCreateCombo("", 100, 412, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Label9 = GUICtrlCreateLabel("Match Password", 4, 276, 83, 17)
    $Input2 = GUICtrlCreateInput("", 100, 272, 121, 21)
    $Input3 = GUICtrlCreateInput("", 100, 552, 121, 21)
    $ListView1 = GUICtrlCreateListView("", 257, 75, 334, 206)
    $Button1 = GUICtrlCreateButton("Set Settings", 300, 607, 75, 22)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $s1 = 'SetSetting server_name '
    $s2 = 'SetSetting gamemode '
    $s3 = 'SetSetting map_cycle '
    $s4 = 'User Maps\downloads\'
    $s9 = 'SetSetting start_rank '
    $s11 = 'SetSetting matchPassword '
    $s12 = 'SetSetting minplayers '
    $s13 = 'SetSetting maxplayers '
    $s19 = 'SetSetting max_score '
    $s21 = 'SetSetting remotePassword '

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

    $i1 = GUICtrlRead($Input1)
    $i2 = GUICtrlRead($Input2)
    $i3 = GUICtrlRead($Input3)
    $c1 = GUICtrlRead($Combo1)
    $c6 = GUICtrlRead($Combo6)
    $c8 = GUICtrlRead($Combo8)
    $c9 = GUICtrlRead($Combo9)
    $c15 = GUICtrlRead($Combo15)

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

    $s5 = 'SetSetting network_type '
    $c2 = GUICtrlRead($Combo2)
    $write1 = 1
    $s6 = 'SetSetting ranked_match '
    $c3 = GUICtrlRead($Combo3)
    $write2 = 1
    If $c3 = "No" Then $write2 = 0

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

    $s7 = 'SetSetting hardcore_mode '
    $c4 = GUICtrlRead($Combo4)
    $write3 = 1
    If $c4 = "No" Then $write3 = 0

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

    $s8 = 'SetSetting match_pb_enabled '
    $c5 = GUICtrlRead($Combo5)
    $write4 = 1
    If $c5 = "No" Then $write4 = 0

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

    $s10 = 'SetSetting allow_voting '
    $c7 = GUICtrlRead($Combo7)
    $write5 = 1
    If $c7 = "No" Then $write5 = 0

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

    $s14 = 'SetSetting teambalance '
    $c10 = GUICtrlRead($Combo10)
    $write6 = 1
    If $c10 = "No" Then $write6 = 0

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

    $s15 = 'SetSetting teamswap '
    $c11 = GUICtrlRead($Combo11)
    $write7 = 1
    If $c11 = "No" Then $write7 = 0

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

    $s16 = 'SetSetting friendly_fire '
    $c12 = GUICtrlRead($Combo12)
    $write8 = 1
    If $c12 = "No" Then $write8 = 0

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

    $s17 = 'SetSetting joinprogress '
    $c13 = GUICtrlRead($Combo13)
    $write9 = 1
    If $c13 = "No" Then $write9 = 0

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

    $s18 = 'SetSetting inroundtime '
    $c14 = GUICtrlRead($Combo14)
    $write10 = 900
    If $c14 = "Infinite" Then $write10 = 0
    If $c14 = "5min" Then $write10 = 300
    If $c14 = "10min" Then $write10 = 600
    If $c14 = "20min" Then $write10 = 1200
    If $c14 = "25min" Then $write10 = 1500
    If $c14 = "30min" Then $write10 = 1800
    If $c14 = "60min" Then $write10 = 3600

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

    $s20 = 'SetSetting detectPublicAddress '
    $c16 = GUICtrlRead($Combo16)
    $write11 = 0
    If $c16 = "Detect public IP" Then $write11 = 1

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

    $s22 = 'SetSetting time_of_day '
    $c17 = GUICtrlRead($Combo17)
    $write12 = 0
    If $c17 = "Random" Then $write12 = -1
    If $c17 = "Dawn" Then $write12 = 6
    If $c17 = "Midday" Then $write12 = 11
    If $c17 = "Dusk" Then $write12 = 21
    If $c17 = "Night" Then $write12 = 23

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

    $s23 = 'SetSetting weather_type '
    $c18 = GUICtrlRead($Combo18)
    $write13 = 0
    If $c18 = "Windy" Then $write13 = 225
    If $c18 = "Varied" Then $write13 = 50
    If $c18 = "Overcast" Then $write13 = 75
    If $c18 = "Stormy" Then $write13 = 100
    If $c18 = "Random" Then $write13 = -1

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

    GUICtrlSetData($Edit1, $s1 & $i1 & @CRLF & $s2 & $c1 & @CRLF & $s3 & $s4 & @CRLF & $s5 & $write1& @CRLF & $s6 & $write2 & @CRLF & _
    $s7 & $write3 & @CRLF & $s8 & $write4 & @CRLF & $s9 & $c6 & @CRLF & $s10 & $write5 & @CRLF & $s11 & $i2 & @CRLF & $s12& $c8 & @CRLF & _
    $s13 & $c9 & @CRLF & $s14 & $write6 & @CRLF & $s15 & $write7 & @CRLF & $s16 & $write8 & @CRLF & $s17 & $write9 & @CRLF & _
    $s18 & $write10 & @CRLF & $s19 & $c15 & @CRLF & $s20 & $write11 & @CRLF & $s21 & $i3 & @CRLF & $s22 & $write12 & @CRLF & _
    $s23 & $write13)

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

    EndSwitch
    WEnd

    [/autoit]
    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section
    $Form2 = GUICreate("FC2 Server Settings", 604, 646, 250, 133)
    $Edit1 = GUICtrlCreateEdit("", 257, 442, 334, 154, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY), $WS_EX_STATICEDGE)
    GUICtrlSetData(-1, "")
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $Input1 = GUICtrlCreateInput("", 3, 33, 219, 21)
    $Combo1 = GUICtrlCreateCombo("", 100, 76, 121, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
    GUICtrlSetData(-1, "Deathmatch|TeamDeathmatch|Uprising|Capture The Diamonds")
    $Label1 = GUICtrlCreateLabel("Server Name", 4, 11, 66, 17)
    GUICtrlSetTip(-1, "maximum of 32 characters (single-byte)")
    $Label2 = GUICtrlCreateLabel("Game Mode", 4, 80, 62, 17)
    $Label3 = GUICtrlCreateLabel("Network Type", 4, 108, 71, 17)
    $Combo2 = GUICtrlCreateCombo("", 100, 103, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Online|LAN")
    $Label19 = GUICtrlCreateLabel("Admin Password", 4, 556, 82, 17)
    $Label5 = GUICtrlCreateLabel("Hardcore Mode", 4, 164, 78, 17)
    $Label17 = GUICtrlCreateLabel("Max Score", 4, 500, 55, 17)
    $Label8 = GUICtrlCreateLabel("Allow Voting", 4, 248, 62, 17)
    $Label7 = GUICtrlCreateLabel("Start Rank", 4, 223, 55, 17)
    $Label20 = GUICtrlCreateLabel("Time Of Day", 4, 584, 63, 17)
    $Label21 = GUICtrlCreateLabel("Wheather Type", 4, 612, 78, 17)
    $Combo4 = GUICtrlCreateCombo("", 100, 160, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Combo15 = GUICtrlCreateCombo("", 100, 496, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "0|5|10|15|20|25|20|40|50|100|200")
    $Combo7 = GUICtrlCreateCombo("", 100, 244, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Combo6 = GUICtrlCreateCombo("", 100, 216, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|45|16|17|18|19")
    $Combo17 = GUICtrlCreateCombo("", 100, 581, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "MapDefault|Random|Dawn|Midday|Dusk|Night")
    $Combo18 = GUICtrlCreateCombo("", 100, 608, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Clear|Windy|Varied|Overcast|Stormy|Random")
    $Combo13 = GUICtrlCreateCombo("", 100, 440, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Combo14 = GUICtrlCreateCombo("", 98, 467, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Infinite|5min|10min|15min|20min|25min|30min|60min")
    $Combo5 = GUICtrlCreateCombo("", 100, 188, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Combo8 = GUICtrlCreateCombo("", 100, 300, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16")
    $Combo9 = GUICtrlCreateCombo("", 100, 329, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16")
    $Combo16 = GUICtrlCreateCombo("", 100, 524, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Detect public IP|Use local IP")
    $Label15 = GUICtrlCreateLabel("Join In Progress", 4, 444, 79, 17)
    $Label16 = GUICtrlCreateLabel("Round Time", 4, 472, 62, 17)
    $Label6 = GUICtrlCreateLabel("Punk Buster", 4, 192, 62, 17)
    $Label10 = GUICtrlCreateLabel("Minimum Players", 4, 304, 82, 17)
    $Label11 = GUICtrlCreateLabel("Maximum Players", 4, 332, 85, 17)
    $Label18 = GUICtrlCreateLabel("Detect Address", 4, 528, 80, 17)
    $Label4 = GUICtrlCreateLabel("Ranked Match", 4, 136, 75, 17)
    $Combo3 = GUICtrlCreateCombo("", 100, 132, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Label12 = GUICtrlCreateLabel("TeamBalance", 4, 360, 70, 17)
    $Combo10 = GUICtrlCreateCombo("", 100, 356, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Label13 = GUICtrlCreateLabel("TeamSwap", 4, 388, 58, 17)
    $Combo11 = GUICtrlCreateCombo("", 100, 384, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Label14 = GUICtrlCreateLabel("Friendly Fire", 4, 416, 60, 17)
    $Combo12 = GUICtrlCreateCombo("", 100, 412, 121, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Yes|No")
    $Label9 = GUICtrlCreateLabel("Match Password", 4, 276, 83, 17)
    $Input2 = GUICtrlCreateInput("", 100, 272, 121, 21)
    $Input3 = GUICtrlCreateInput("", 100, 552, 121, 21)
    $ListView1 = GUICtrlCreateListView("", 257, 75, 334, 206)
    $Button1 = GUICtrlCreateButton("Set Settings", 300, 607, 75, 22)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    Case $Button1
    $s1 = 'SetSetting server_name '
    $s2 = 'SetSetting gamemode '
    $s3 = 'SetSetting map_cycle '
    $s4 = 'User Maps\downloads\'
    $s9 = 'SetSetting start_rank '
    $s11 = 'SetSetting matchPassword '
    $s12 = 'SetSetting minplayers '
    $s13 = 'SetSetting maxplayers '
    $s19 = 'SetSetting max_score '
    $s21 = 'SetSetting remotePassword '

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

    $i1 = GUICtrlRead($Input1)
    $i2 = GUICtrlRead($Input2)
    $i3 = GUICtrlRead($Input3)
    $c1 = GUICtrlRead($Combo1)
    $c6 = GUICtrlRead($Combo6)
    $c8 = GUICtrlRead($Combo8)
    $c9 = GUICtrlRead($Combo9)
    $c15 = GUICtrlRead($Combo15)

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

    Local $write1
    Local $write2
    Local $write3
    Local $write4
    Local $write5
    Local $write6
    Local $write7
    Local $write8
    Local $write9
    Local $write10
    Local $write11
    Local $write12
    Local $write13

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

    $s5 = 'SetSetting network_type '
    $c2 = GUICtrlRead($Combo2)
    Switch $c2
    Case "Online"
    $write1 = 1
    Case "LAN"
    $write1 = 0
    Case Else
    MsgBox(16, 'Error',"Network Type Is Empty")
    EndSwitch

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

    $s6 = 'SetSetting ranked_match '
    $c3 = GUICtrlRead($Combo3)
    Switch $c3
    Case "Yes"
    $write2 = 1
    Case "No"
    $write2 = 0
    Case Else
    MsgBox(16, 'Error',"Ranked Match Is Empty")

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

    EndSwitch

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

    $s7 = 'SetSetting hardcore_mode '
    $c4 = GUICtrlRead($Combo4)
    Switch $c4
    Case "Yes"
    $write3 = 1
    Case "No"
    $write3 = 0
    Case Else
    MsgBox(16, 'Error',"Hardcore Mode Is Empty")

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

    EndSwitch

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

    $s8 = 'SetSetting match_pb_enabled '
    $c5 = GUICtrlRead($Combo5)
    Switch $c5
    Case "Yes"
    $write4 = 1
    Case "No"
    $write4 = 0
    Case Else
    MsgBox(16, 'Error',"Punk Buster Is Empty")

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

    EndSwitch

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

    $s10 = 'SetSetting allow_voting '
    $c7 = GUICtrlRead($Combo7)
    Switch $c7
    Case "Yes"
    $write5 = 1
    Case "No"
    $write5 = 0
    Case Else
    MsgBox(16, 'Error',"Allow Voting Is Empty")

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

    EndSwitch

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

    $s14 = 'SetSetting teambalance '
    $c10 = GUICtrlRead($Combo10)
    Switch $c10
    Case "Yes"
    $write6 = 1
    Case "No"
    $write6 = 0
    Case Else
    MsgBox(16, 'Error',"Teambalance Is Empty")

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

    EndSwitch

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

    $s15 = 'SetSetting teamswap '
    $c11 = GUICtrlRead($Combo11)
    Switch $c11
    Case "Yes"
    $write7 = 1
    Case "No"
    $write7 = 0
    Case Else
    MsgBox(16, 'Error',"Teambswap Is Empty")

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

    EndSwitch

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

    $s16 = 'SetSetting friendly_fire '
    $c12 = GUICtrlRead($Combo12)
    Switch $c12
    Case "Yes"
    $write8 = 1
    Case "No"
    $write8 = 0
    Case Else
    MsgBox(16, 'Error',"Friendly Fire Is Empty")

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

    EndSwitch

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

    $s17 = 'SetSetting joinprogress '
    $c13 = GUICtrlRead($Combo13)
    Switch $c13
    Case "Yes"
    $write9 = 1
    Case "No"
    $write9 = 0
    Case Else
    MsgBox(16, 'Error',"Join In Progress Is Empty")

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

    EndSwitch

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

    $s18 = 'SetSetting inroundtime '
    $c14 = GUICtrlRead($Combo14)
    Switch $c14
    Case "Infinite"
    $write10 = 0
    Case "5min"
    $write10 = 300
    Case "10min"
    $write10 = 600
    Case "15min"
    $write10 = 900
    Case "20min"
    $write10 = 1200
    Case "25min"
    $write10 = 1500
    Case "30min"
    $write10 = 1800
    Case "60min"
    $write10 = 3600
    Case Else
    MsgBox(16, 'Error',"Round Time Is Empty")

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

    EndSwitch

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

    $s20 = 'SetSetting detectPublicAddress '
    $c16 = GUICtrlRead($Combo16)
    Switch $c16
    Case "Detect public IP"
    $write11 = 1
    Case "Use local IP"
    $write11 = 0
    Case Else
    MsgBox(16, 'Error',"Detect Address Is Empty")

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

    EndSwitch

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

    $s22 = 'SetSetting time_of_day '
    $c17 = GUICtrlRead($Combo17)
    Switch $c17
    Case "Map Default"
    $write12 = 0
    Case "Random"
    $write12 = -1
    Case "Dawn"
    $write12 = 6
    Case "Midday"
    $write12 = 11
    Case "Dusk"
    $write12 = 21
    Case "Night"
    $write12 = 23
    Case Else
    MsgBox(16, 'Error',"Time Of Day Is Empty")

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

    EndSwitch

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

    $s23 = 'SetSetting weather_type '
    $c18 = GUICtrlRead($Combo18)
    Switch $c18
    Case "Clear"
    $write13 = 0
    Case "Windy"
    $write13 = 225
    Case "Varied"
    $write13 = 50
    Case "Overcast"
    $write13 = 75
    Case "Stormy"
    $write13 = 100
    Case "Random"
    $write13 = -1
    Case Else
    MsgBox(16, 'Error',"Weather Type Is Empty")

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

    EndSwitch

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

    GUICtrlSetData($Edit1, $s1 & $i1 & @CRLF & $s2 & $c1 & @CRLF & $s3 & $s4 & @CRLF & $s5 & $write1& @CRLF & $s6 & $write2 & @CRLF & _
    $s7 & $write3 & @CRLF & $s8 & $write4 & @CRLF & $s9 & $c6 & @CRLF & $s10 & $write5 & @CRLF & $s11 & $i2 & @CRLF & $s12& $c8 & @CRLF & _
    $s13 & $c9 & @CRLF & $s14 & $write6 & @CRLF & $s15 & $write7 & @CRLF & $s16 & $write8 & @CRLF & $s17 & $write9 & @CRLF & _
    $s18 & $write10 & @CRLF & $s19 & $c15 & @CRLF & $s20 & $write11 & @CRLF & $s21 & $i3 & @CRLF & $s22 & $write12 & @CRLF & _
    $s23 & $write13)

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

    EndSwitch
    WEnd

    [/autoit]
  • Combox auslesen und in Edit anderen wert schreiben.

    • VinceA
    • 23. Februar 2013 um 01:32

    Hi Leute
    Ich habe eine Gui ( Server Settings ) mit Combo ( Ja|Nein), einen Button ( Set Settings) und ein Edit.
    Wenn ich in der Combo ja oder nein anklicke, drücke den Button und der wert wird in die Edit geschrieben
    Meine Frage , Ist es möglich wenn ich in der Combo Nein klicke das es den wert 0 anstelle von Nein in die Edit schreibt?
    Und anstelle von Ja den wert 1.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Server Settings", 237, 439, 361, 122)
    $Combo1 = GUICtrlCreateCombo("", 9, 69, 145, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_DROPDOWNLIST))
    GUICtrlSetData(-1, "Yes|No")
    $Label1 = GUICtrlCreateLabel("Friendly Fire", 9, 48, 60, 17)
    $Edit1 = GUICtrlCreateEdit("", 6, 187, 196, 89, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
    GUICtrlSetData(-1, "")
    $Button1 = GUICtrlCreateButton("Set Settings", 11, 120, 75, 25)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $s = 'SetSetting friendly_fire '
    $read = GUICtrlRead($Combo1)
    GUICtrlSetData ($Edit1,$s & $read)

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

    EndSwitch
    WEnd

    [/autoit]

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™