Minecraft-Server-Editor v2.0.3

  • Hier ist mein erstes richtiges Projekt in AutoIt: der Minecraft-Server-Editor.

    Was macht das Programm?
    Mit diesem Programm kann man einfach eine bestehende server.properties-Datei bearbeiten.

    Screen:
    [Blockierte Grafik: http://i.imgur.com/7T5Mh6Y.png]

    Source Code:

    Spoiler anzeigen
    [autoit]

    #include <File.au3>
    #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("Minecraft-Server-Editor", 418, 434, 199, 129)
    $basic = GUICtrlCreateGroup("Basic", 8, 0, 185, 169)

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

    $label_difficulty = GUICtrlCreateLabel("Difficulty:", 16, 16, 47, 17)
    $combo_difficulty = GUICtrlCreateCombo("", 88, 16, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Peacefull|Easy|Normal|Hard")

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

    $label_gamemode = GUICtrlCreateLabel("Gamemode:", 16, 40, 61, 17)
    $combo_gamemode = GUICtrlCreateCombo("", 88, 40, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Survival|Creative|Adventure")

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

    $label_level_name = GUICtrlCreateLabel("Level-Name:", 16, 64, 64, 17)
    $input_level_name = GUICtrlCreateInput("", 88, 64, 89, 21)

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

    $label_max_player = GUICtrlCreateLabel("Max-Players:", 16, 88, 64, 17)
    $input_max_player = GUICtrlCreateInput("", 88, 88, 89, 21)

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

    $label_online_mode = GUICtrlCreateLabel("Online Mode:", 16, 112, 67, 17)
    $combo_online_mode = GUICtrlCreateCombo("", 88, 112, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    $label_pvp = GUICtrlCreateLabel("PvP:", 16, 136, 27, 17)
    $combo_pvp = GUICtrlCreateCombo("", 88, 136, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $additional1 = GUICtrlCreateGroup("Additional 1", 224, 0, 185, 169)

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

    $label_flying = GUICtrlCreateLabel("Flying:", 232, 16, 34, 17)
    $combo_flying = GUICtrlCreateCombo("", 304, 16, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    $label_nether = GUICtrlCreateLabel("Nether:", 232, 40, 39, 17)
    $combo_nether = GUICtrlCreateCombo("", 304, 40, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    $label_structures = GUICtrlCreateLabel("Structures:", 232, 64, 55, 17)
    $combo_structures = GUICtrlCreateCombo("", 304, 64, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    $label_seed = GUICtrlCreateLabel("Seed:", 232, 88, 32, 17)
    $input_seed = GUICtrlCreateInput("", 304, 88, 89, 21)

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

    $label_type = GUICtrlCreateLabel("Type:", 232, 112, 31, 17)
    $combo_type = GUICtrlCreateCombo("", 304, 112, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Default|Flat|Largebiomes")

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

    $label_white_list = GUICtrlCreateLabel("White-List:", 232, 136, 54, 17)
    $combo_white_list = GUICtrlCreateCombo("", 304, 136, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $additional2 = GUICtrlCreateGroup("Additional 2", 8, 176, 401, 217)

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

    $label_query = GUICtrlCreateLabel("Query:", 16, 192, 38, 17)
    $combo_query = GUICtrlCreateCombo("", 112, 192, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    $label_generator_settings = GUICtrlCreateLabel("Generator-Settings:", 16, 216, 95, 17)
    $input_generator = GUICtrlCreateInput("", 112, 216, 89, 21)

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

    $label_description = GUICtrlCreateLabel("Description:", 16, 240, 60, 17)
    $input_description = GUICtrlCreateInput("", 112, 240, 89, 21)

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

    $label_server_ip = GUICtrlCreateLabel("Server-IP:", 16, 264, 51, 17)
    $input_server_ip = GUICtrlCreateInput("", 112, 264, 89, 21)

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

    $label_server_port = GUICtrlCreateLabel("Server-Port:", 16, 288, 60, 17)
    $input_server_port = GUICtrlCreateInput("", 112, 288, 89, 21)

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

    $label_snooper = GUICtrlCreateLabel("Snooper:", 216, 312, 47, 17)
    $combo_snooper = GUICtrlCreateCombo("", 304, 312, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    $label_spawn_animal = GUICtrlCreateLabel("Spawn Animals:", 216, 192, 79, 17)
    $combo_spawn_animals = GUICtrlCreateCombo("", 304, 192, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    $label_spawn_monsters = GUICtrlCreateLabel("Spawn Monsters:", 216, 216, 86, 17)
    $combo_spawn_monsters = GUICtrlCreateCombo("", 304, 216, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Diesabled")

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

    $label_spawn_npcs = GUICtrlCreateLabel("Spawn NPCs:", 216, 240, 70, 17)
    $combo_spawn_npcs = GUICtrlCreateCombo("", 304, 240, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    $label_texturepack = GUICtrlCreateLabel("Texturepack:", 216, 264, 67, 17)
    $input_texturepack = GUICtrlCreateInput("", 304, 264, 89, 21)

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

    $label_view_distance = GUICtrlCreateLabel("View-Distance:", 216, 288, 75, 17)
    $input_view_distance = GUICtrlCreateInput("", 304, 288, 89, 21)

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

    $label_enableRcon = GUICtrlCreateLabel("Rcon:", 16, 312, 33, 17)
    $combo_enableRcon = GUICtrlCreateCombo("", 112, 312, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Enabled|Disabled")

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

    $label_rconPassword = GUICtrlCreateLabel("Rcon-Password:", 16, 336, 82, 17)
    $input_rconPassword = GUICtrlCreateInput("", 112, 336, 89, 21)

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

    $label_rconPort = GUICtrlCreateLabel("Rcon-Port:", 16, 360, 55, 17)
    $input_rconPort = GUICtrlCreateInput("", 112, 360, 89, 21)

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

    $label_qureyPort = GUICtrlCreateLabel("Query-Port:", 216, 336, 57, 17)
    $input_queryPort = GUICtrlCreateInput("", 304, 336, 89, 21)

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

    GUICtrlCreateGroup("", -99, -99, 1, 1)

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

    $button_save = GUICtrlCreateButton("Save", 8, 400, 195, 25)

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

    $button_exit = GUICtrlCreateButton("Exit", 216, 400, 195, 25)

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

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    $file = "server.properties"

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

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

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

    Case $button_save
    _Save()
    Case $button_exit
    Exit
    EndSwitch
    WEnd

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

    Func _Save()
    If FileExists($file) Then FileDelete($file)

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

    $difficulty = GUICtrlRead($combo_difficulty)
    $gameMode = GUICtrlRead($combo_gamemode)
    $levelName = GUICtrlRead($input_level_name)
    $maxPlayer = GUICtrlRead($input_max_player)
    $onlineMode = GUICtrlRead($combo_online_mode)
    $pvp = GUICtrlRead($combo_pvp)
    $flight = GUICtrlRead($combo_flying)
    $nether = GUICtrlRead($combo_nether)
    $generateStructures = GUICtrlRead($combo_structures)
    $levelSeed = GUICtrlRead($input_seed)
    $levelType = GUICtrlRead($combo_type)
    $whiteList = GUICtrlRead($combo_white_list)
    $qery = GUICtrlRead($combo_query)
    $generatorSettings = GUICtrlRead($input_generator)
    $motd = GUICtrlRead($input_description)
    $serverIP = GUICtrlRead($input_server_ip)
    $serverPort = GUICtrlRead($input_server_port)
    $snooper = GUICtrlRead($combo_snooper)
    $spawnAnimals = GUICtrlRead($combo_spawn_animals)
    $spawnMonster = GUICtrlRead($combo_spawn_monsters)
    $spawnNPCs = GUICtrlRead($combo_spawn_npcs)
    $texturepack = GUICtrlRead($input_texturepack)
    $viewDistance = GUICtrlRead($input_view_distance)
    $rcon = GUICtrlRead($combo_enableRcon)
    $rconPassword = GUICtrlRead($input_rconPassword)
    $rconPort = GUICtrlRead($input_rconPort)
    $queryPort = GUICtrlRead($input_queryPort)

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

    If $difficulty = "Peacefull" Then IniWrite($file, "temp", "difficulty", "0")
    If $difficulty = "Easy" Then IniWrite($file, "temp", "difficulty", "1")
    If $difficulty = "Normal" Then IniWrite($file, "temp", "difficulty", "2")
    If $difficulty = "Hard" Then IniWrite($file, "temp", "difficulty", "3")

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

    If $gameMode = "Survival" Then IniWrite($file, "temp", "game-mode", "0")
    If $difficulty = "Creative" Then IniWrite($file, "temp", "game-mode", "1")
    If $difficulty = "Adventure" Then IniWrite($file, "temp", "game-mode", "2")

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

    IniWrite($file, "temp", "level-name", $levelName)

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

    IniWrite($file, "temp", "max-player", $maxPlayer)

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

    If $onlineMode = "Enabled" Then IniWrite($file, "temp", "online-mode", "true")
    If $onlineMode = "Disabled" Then IniWrite($file, "temp", "online-mode", "false")

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

    If $pvp = "Enabled" Then IniWrite($file, "temp", "pvp", "true")
    If $pvp = "Disabled" Then IniWrite($file, "temp", "pvp", "false")

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

    If $flight = "Enabled" Then IniWrite($file, "temp", "allow-flight", "true")
    If $flight = "Disabled" Then IniWrite($file, "temp", "allow-flight", "false")

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

    If $nether = "Enabled" Then IniWrite($file, "temp", "allow-nether", "true")
    If $nether = "Disabled" Then IniWrite($file, "temp", "allow-nether", "false")

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

    If $generateStructures = "Enabled" Then IniWrite($file, "temp", "generate-structures", "true")
    If $generateStructures = "Diesabled" Then IniWrite($file, "temp", "generate-structures", "false")

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

    IniWrite($file, "temp", "level-seed", $levelSeed)

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

    If $levelType = "Default" Then IniWrite($file, "temp", "level-type", "DEFAULT")
    If $levelType = "Flat" Then IniWrite($file, "temp", "level-type", "FLAT")
    If $levelType = "Largebiomes" Then IniWrite($file, "temp", "level-type", "LARGEBIOMES")

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

    If $whiteList = "Enabled" Then IniWrite($file, "temp", "white-list", "true")
    If $whiteList = "Disabled" Then IniWrite($file, "temp", "white-list", "false")

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

    If $qery = "Enabled" Then IniWrite($file, "temp", "enable-query", "true")
    If $qery = "Disabled" Then IniWrite($file, "temp", "enable-query", "false")

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

    IniWrite($file, "temp", "generator-settings", $generatorSettings)

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

    IniWrite($file, "temp", "motd", $motd)

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

    IniWrite($file, "temp", "server-ip", $serverIP)

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

    IniWrite($file, "temp", "server-port", $serverPort)

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

    If $snooper = "Enabled" Then IniWrite($file, "temp", "enable-snooper", "true")
    If $snooper = "Disabled" Then IniWrite($file, "temp", "enable-snooper", "false")

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

    If $spawnAnimals = "Enabled" Then IniWrite($file, "temp", "spawn-animals", "true")
    If $spawnAnimals = "Disabled" Then IniWrite($file, "temp", "spawn-animals", "false")

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

    If $spawnMonster = "Enabled" Then IniWrite($file, "temp", "spawn-monsters", "true")
    If $spawnAnimals = "Disabled" Then IniWrite($file, "temp", "spawn-monsters", "false")

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

    If $spawnNPCs = "Enabled" Then IniWrite($file, "temp", "spawn-npcs", "true")
    If $spawnNPCs = "Disabled" Then IniWrite($file, "temp", "spawn-npcs", "false")

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

    IniWrite($file, "temp", "texturepack", $texturepack)

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

    IniWrite($file, "temp", "view-distance", $viewDistance)

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

    If $rcon = "Enabled" Then IniWrite($file, "temp", "enable-rcon", "true")
    If $rcon = "Disabled" Then IniWrite($file, "temp", "enable-rcon", "false")

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

    IniWrite($file, "temp", "rcon.password", $rconPassword)

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

    IniWrite($file, "temp", "rcon.port", $rconPort)

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

    IniWrite($file, "temp", "query.port", $queryPort)

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

    _FileWriteToLine($file, 1, "", 1)
    EndFunc

    [/autoit]


    Download:
    v2.0.3
    Programm Mirror #1
    Source Code Mirror #1

    10 Mal editiert, zuletzt von Zimtrax (28. Februar 2013 um 19:47)

  • Sieht gut aus :) Kann es gerade leider nicht testen, aber das hole ich vermutlich nach ;)
    Das ganze muss ich für mein MST auch noch coden^^

    Da es hier doch einige falsch machen:

    Zitat von einem User dieses Forums

    Die Standard-Standart eines Flamingos ist einbeinig. ;)

  • Und das Tool funktioniert???

    Du hast Switch...Case und Select...Case durcheinander gewürfelt. Zudem musst du dir nochmal GUIGetMsg durchlesen, wie das funktioniert.
    Bei einem Case nimmt man auch eigentlich keine Inputs, wenn dann permanent auswerten innerhalb der Schleife, aber außerhalb des Switch oder nach einen Tastendruck auswerten bzw. weiterverarbeiten.

  • Außerdem könnte man die Properties-Datei wahrscheinlich mit INI-Befehlen bearbeiten.
    Man muss nur eine Section temporär hinzufügen und danach wieder entfernen... Ist eventuell übersichtlicher.^^

    Aber du solltest dir wirklich nochmal die Grundlagen von AutoIt anschauen. Denn so wird das nicht funktionieren.

    chess

  • Meiner meinung nach schaut das Sauber aus. Fürs erste mal recht gut ;)
    Auf den ersten blick hab ich auch nichts gesehen das du durcheinander geschmissen hättest.

    Eleganter wäre wohl die Daten zu sammeln und per knopfdruck die Datei komplett zu schreiben.
    Wenn vorher manuell editiert wurde stimmen die Lines nichtmehr und dann kann es sein das dein Programm
    schnell den überblick verliert.

    Also versuch folgende Reihenfolge

    GUI erzeugen
    -> Funktion um Daten zu Laden aufrufen
    -> Funktion Updated GUI
    -> Userblabla
    -> User drückt speichert
    -> Speicherfunktion speichert datei, Ladefunktion wird erneut gerufen

    -

  • Nachid
    Siehe dieser Snippet:

    [autoit]


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

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

    Case $difficulty = "Peacefull"
    _FileWriteToLine($file, 22, "difficulty=0", 1)
    Case $difficulty = "Easy"
    _FileWriteToLine($file, 22, "difficulty=1", 1)
    Case $difficulty = "Normal"
    _FileWriteToLine($file, 22, "difficulty=2", 1)
    Case $difficulty = "Hard"
    _FileWriteToLine($file, 22, "difficulty=3", 1)

    [/autoit]

    Weißt du jetzt, was wir meinen?^^

    chess

  • Habs voll übersehen sah recht legitim aus xP
    dürfte aber Funktionieren ? hab das schonmal so ähnlich gemacht....
    Hab grad leider kein AutoIt da


    Wenn ichs recht seh switch auf die $nMSG und dann Case unterscheidung von anderen variablen...^^

    -

  • Erstens:
    Diese Zeile:

    [autoit]


    $difficulty = GUICtrlCreateCombo("", 80, 16, 89, 25)

    [/autoit]


    Also fehlt GUICtrlRead.

    Und sonst kann ich dir auch sagen, was passiert:
    Es wird überprüft, ob $difficulty dem String entspricht (Ist natürlich nicht so).
    Also steht da False.
    Und dann wird Msg mit False verglichen

    chess

  • Ich weiß nicht warum, aber ich hatte grade "Lust".
    Das Tool läuft nicht, weil die Savefunktion fehlt. (Die bau ich noch ein irgendwann^^).
    Die Texte hab ich einfach kopiert. Keine Ahnung ob die stimmen.

    &quot;44 Zeilen voller Überblick ;)&quot;
    [autoit]

    Global $aText[56] = ['MC-Server-Editor', 'Basic', 'Additional 1', 'Additional 2', 'coded 4 AutoIt.de', 'Difficulty', 'Gamemode', 'Level-Name', 'Max-Players', 'Online Mode', 'PvP', 'Normal|Peaceful|Easy|Hard', 'Survival|Creative|Adventure', 'world', '10', 'True|False', 'Enabled|Disabled', 'Flying', 'Nether', 'Structures', 'Seed', 'Type', 'White-List', 'Disabled|Enabled', 'Enabled|Disabled', 'Enabled|Disabled', 'autoit.de', 'Default|Flat|Largebiomes', 'Disabled|Enabled', 'Quarry', 'Gen.Settings', 'Description', 'Server-IP', 'Server-Port', 'Snooper', 'Enabled|Disabled', '', '', '', '25565', 'Disabled|Enabled', 'Spawn Animals', 'Spawn Monsters', 'Spawn NPCs', 'Texturepack', 'View-Distance', 'Command-Block', 'Enabled|Disabled', 'Enabled|Disabled', 'Enabled|Disabled', '', '10', 'Enabled|Disabled', 'Additional 3', 'Additional 4', 'Exit/Save'], $hGUI, $aLabel[24], $aInput[24], $btnSave, $iTmp

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

    $hGUI = GUICreate($aText[0], 375, 380)
    GUISetBkColor(0xB0B0B0, $hGUI)
    For $i = 0 To 5 Step 1
    For $q = 0 To 1 Step 1
    If $i < 2 Then GUICtrlCreateGroup($aText[1 + $i + 52 * $q], 185 * $i + 5, 175 * $q + 5, 180, 165)
    For $o = 0 To 1 Step 1
    $aLabel[$i + 6 * $o + $q * 12] = GUICtrlCreateLabel($aText[$i + 5 + 12 * $o + 24 * $q] & ':', 185 * $o + 15, 175 * $q + 25 + 24 * $i, 85)
    $aInput[$i + 6 * $o + $q * 12] = GUICtrlCreateCombo(First($aText[11 + $i + 12 * $o + 24 * $q]), 185 * $o + 100, 175 * $q + 21 + 24 * $i, 78)
    If StringInStr($aText[11 + $i + 12 * $o + 24 * $q], '|') Then GUICtrlSetData(-1, TrimFirst($aText[11 + $i + 12 * $o + 24 * $q]))
    If $i < 5 Then $iTmp = GUICtrlCreateLabel('', 185 * $o + 15, 175 * $q + 43 + 24 * $i, 160, 1) + GUICtrlSetBkColor(-1, 0xCCCCCC)
    Next
    Next
    Next
    $btnSave = GUICtrlCreateButton($aText[55], 147, 350, 80, 25)
    GUISetState(@SW_SHOW)

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

    While True
    Switch GUIGetMsg()
    Case -3
    Exit
    Case $btnSave
    _Save()
    EndSwitch
    WEnd

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

    Func _Save()
    Exit
    EndFunc ;==>_Save

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

    Func First($a)
    Local $b = StringSplit($a, '|', 2)
    If Not @error Then Return $b[0]
    Return $a
    EndFunc ;==>First

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

    Func TrimFirst($a)
    Local $b = StringSplit($a, '|', 2), $c = ''
    For $i = 1 To UBound($b) - 1 Step 1
    $c &= $b[$i] & '|'
    Next
    Return StringTrimRight($c, 1)
    EndFunc ;==>TrimFirst

    [/autoit]
  • Ich habs auch getestet und alles was über eine Combo läuft funktioniert nicht.
    Die InputFelder laufen, weil ein GuiCtrlread eingebaut ist.
    Völlige Funktion kann ich nicht bestätigen.

  • Mir gehts wie Mars. Ausserdem würd ich dir praktischerweise vorschlagen, die aktuellen Einstellungen direkt einzulesen so sieht man auch direkt was bissher eingestellt ist. Zusätzlich wäre es noch praktisch wenn man die Texturepacks i-wie aus den lokal installierten auswählen kann

    Bild1: Ich beim debuggen

  • Hmm..."könnte" sein ^^ hab ich noch nie genauer versucht. Andernfalls gibt es ja aber bestimmt eine Seite wo man spezifisch die wichtigsten/besten Packs zusammengefasst hat, für Anfänger wäre das vieleicht einfacher als dass sie 100 versch. Links ausprobieren müssen bis eines klappt, nur so ne Idee.

    Bild1: Ich beim debuggen

  • Außerdem könnte man die Properties-Datei wahrscheinlich mit INI-Befehlen bearbeiten.
    Man muss nur eine Section temporär hinzufügen und danach wieder entfernen... Ist eventuell übersichtlicher.^^

    Aber du solltest dir wirklich nochmal die Grundlagen von AutoIt anschauen. Denn so wird das nicht funktionieren.

    chess

    habe jetzt INI-Befehle genutzt (ist echt übersichtlicher). Ich hab nur keine Ahnung wie ich die Section lösche ohne dass die ganzen Keys auch noch gelöscht werden ?(

  • Habe erstmal ein paar neue sachen hinzugefügt (query-port, rcon-password & rcon-port) und die Ini-Befehle eingebaut. Hoffe dass diesmal alles funktioniert.