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
#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 ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$s = 'SetSetting friendly_fire '
$read = GUICtrlRead($Combo1)
GUICtrlSetData ($Edit1,$s & $read)
EndSwitch
WEnd