Hi cih wollte die andminstartion des servers einfacher gestalten bzw schneller machen.
Dafür habe cih mir ein kleines programm zusammen geschrieben.
Nu wollt cih das so machen das die User in einer ComboBox aufgelistet sind.
Sodasss cih für jeden user einzeln befehl machen kann. Ich hab schon ein paar befehle per radiobutton doch es kommen ncoh so viele dazu das es einfacher wäre wenn user in ner combobox sind.
Kurz gesagt: "Wie bekomme cih die Usernames die online sind in die ComboBox?"
Danke im vorraus
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Tobi\Desktop\Neuer Ordner\MineCraft ServerHelper\kODA\Forms\MineCraftServerHelper.kxf
$MineCraftServerHelper = GUICreate("MineCraft ServerHelper V0.1 Beta ", 319, 307, 195, 129)
$Group1 = GUICtrlCreateGroup("Main", 0, 0, 89, 121)
$Button1 = GUICtrlCreateButton("Start", 8, 24, 75, 25)
$Button2 = GUICtrlCreateButton("Stop", 8, 56, 75, 25)
$Button3 = GUICtrlCreateButton("Reload", 8, 88, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$i = GUICtrlCreateInput("say", 112, 32, 121, 21)
$Label1 = GUICtrlCreateLabel("Server Messages", 112, 8, 86, 17)
$Radio1 = GUICtrlCreateRadio("Kick", 8, 136, 89, 17)
$Radio2 = GUICtrlCreateRadio("Ban", 8, 160, 81, 17)
$Radio3 = GUICtrlCreateRadio("Unban", 8, 184, 73, 17)
$Input1 = GUICtrlCreateInput("", 104, 152, 121, 21)
$Label2 = GUICtrlCreateLabel("Username:", 104, 128, 55, 17)
$Label3 = GUICtrlCreateLabel("Reason:", 104, 184, 44, 17)
$Input2 = GUICtrlCreateInput("", 104, 208, 121, 21)
$OP = GUICtrlCreateRadio("OP", 8, 208, 65, 17)
$DeOp = GUICtrlCreateRadio("DeOp", 8, 232, 65, 17)
$Send = GUICtrlCreateButton("Send", 240, 32, 75, 25)
$Sending = GUICtrlCreateButton("Send", 152, 240, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
run( @scriptDir & "server.bat" )
Case $Button2
SendKeepActive( "C:\WINDOWS\system32\cmd.exe" )
Send( "stop" )
Send( "{Enter}" )
Case $Button3
SendKeepActive( "C:\WINDOWS\system32\cmd.exe" )
Send( "reload" )
Send( "{Enter}" )
Case $Send ;Send befehl nachrichten rundfunk
SendKeepActive( "C:\WINDOWS\system32\cmd.exe" )
Send("say")
Send(" ")
Send(GUICtrlRead($i))
Send("{enter}")
Case $Sending
$r1 = GUICtrlRead($Radio1) ; kick
$r2 = GUICtrlRead($Radio2) ; ban
$r3 = GUICtrlRead($Radio3) ; pardon
$r4 = GUICtrlRead($op) ; opping
$r5 = GUICtrlRead($deop) ; deop
SendKeepActive( "C:\WINDOWS\system32\cmd.exe" )
if $r1 = 1 then
Send("kick")
Send(" ")
Send(GUICtrlRead($Input1))
Send(" ")
Send(GUICtrlRead($Input2))
Send("{enter}")
else
endif
if $r2 = 1 then
Send("ban")
Send(" ")
Send(GUICtrlRead($Input1))
Send(" ")
Send(GUICtrlRead($Input2))
Send("{enter}")
else
endif
if $r3 = 1 then
Send("pardon")
Send(" ")
Send(GUICtrlRead($Input1))
Send(" ")
Send(GUICtrlRead($Input2))
Send("{enter}")
else
endif
if $r4 = 1 then
Send("op")
Send(" ")
Send(GUICtrlRead($Input1))
Send(" ")
Send(GUICtrlRead($Input2))
Send("{enter}")
else
endif
if $r5 = 1 then
Send("deop")
Send(" ")
Send(GUICtrlRead($Input1))
Send(" ")
Send(GUICtrlRead($Input2))
Send("{enter}")
else
endif
EndSwitch
WEnd