Hey,
I am writing a WinGUI for the Bukkit Server. (Server Mod for the well known Minecraft game)
Its function should be, that you can easily issue commands and see the whole server log in the current console.
I will also add some other features, like an easy way to check all your plugin versions and maybe an auto-updater for them.
Starting the Server per batch or run has some limitations that just doesn't sit right with me.
Now I got so far that I can easily get all the output send to the Input-box on my Form with StdoutRead.
The problem is that I can't send any commands to the Server with StdinWrite.
If you could give me some pointers or even a fixed version of the script I would be very grateful.
MfG Moonwolf
PS: For everyone, who want to test the script for themselves; It is currently only set up for 64bit machines and the run command has to be rewritten for 32bit machines.
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <Array.au3> $ConsoleOut = GUICtrlCreateEdit("", 8, 8, 890, 441, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$ES_READONLY,$WS_HSCROLL,$WS_VSCROLL)) ;some debug stuff $debug = 0 MsgBox(0,"debug","Scriptdir: " & '"' & @ScriptDir & '"' & @CRLF & "working dir: " & '"' & @WorkingDir & '"') ;Start the Bukkit Server ;Note: set @SW_SHOW to @SW_HIDE after debug! ;Note: add check for 32bit arch after StdinWrite has been resolved ;$Server = Run('Start.bat',@ScriptDir,@SW_Show,$STDIN_CHILD + $STDERR_MERGED) $Server = Run('"C:\Program Files\Java\jre7\bin\java.exe" -Xms1024M -Xmx1024M -jar "C:\Users\Moonwolf\Desktop\Craftbukkit Server\craftbukkit.jar"',@ScriptDir,@SW_Show,$STDIN_CHILD + $STDERR_MERGED) ;Main Loop While 1 ReadOut() ;Write data to InputBox While 1 ;Send Command ;save exit ; additional stop script for batch server ;While ProcessExists($Server) ; Sleep(1000) ; StdinWrite($Server,"{ENTER}") ;WEnd