Note that there are some explanatory texts on larger screens.

plurals
  1. POAutoit Add data instead of replace data
    primarykey
    data
    text
    <p>I start a server with:</p> <pre><code>$BungeeServer = Run("java -Xmx512M -jar " &amp; '"' &amp; $file0 &amp; "\BungeeCord.jar" &amp; '"', $file0, $Hide, $STDERR_MERGED) </code></pre> <p>Then I get the data from the server with(It's in a while loop):</p> <pre><code>Assign("sOutput", StdoutRead($BungeeServer, False, False) &amp; @CRLF) GUICtrlSetData($Edit1, $sOutput) </code></pre> <p>The problem is that It only returns the latest string of information. I need it to add instead of replace the values. Anybody know an easy way to do that?</p> <p>Edit: When a server starts, you normally get a cmd window. I want to be able to have it in a Gui instead. Also I only want it to appear when I click a button, still it should start getting data when the server starts. The lines of text also went outside the box. I tried:</p> <pre><code>Do $msg1 = GUIGetMsg() $line1 = StdoutRead($BungeeServer, True) $totalOutput1 &amp;= $line1 &amp; @CRLF GUICtrlSetData($Edit1, $totalOutput1) $line2 = StdoutRead($1, True) $totalOutput2 &amp;= $line2 &amp; @CRLF GUICtrlSetData($Edit2, $totalOutput2) $line3 = StdoutRead($2, True) $totalOutput3 &amp;= $line3 &amp; @CRLF Until $msg = $GUI_EVENT_CLOSE </code></pre> <p>The edit boxes were made with:</p> <pre><code> $Form2 = GUICreate("Servers", @DesktopWidth - 15, @DesktopHeight - _GetTaskBarHeight() - 35, -1, -1) $Edit1 = GUICtrlCreateEdit("", 0, 0, 634, 334, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL)) Font() $Edit2 = GUICtrlCreateEdit("", 635, 0, 634, 334, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL)) Font() $Edit3 = GUICtrlCreateEdit("", 634 + 634, 0, 634, 334, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL)) Font() GUISetState(@SW_SHOW) </code></pre> <p>Edit: I found a better way to do it where I made a child window and didn't need all the other stuff:</p> <pre><code> $GUI = GUICreate("Consoles", 1020, 600, 1282, 300, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_CLIPCHILDREN, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_BORDER, $WS_CLIPSIBLINGS)) If GUICtrlRead($Bungee) = 1 Then $BungeeServer = Run("java -Xmx512M -jar " &amp; '"' &amp; $file0 &amp; "\BungeeCord.jar" &amp; '"', $file0, $Hide) If Not ProcessWait($BungeeServer) = 0 Then WinSetTitle("C:\Windows\system32\java.exe", "", "Bungee") WinSetTitle("C:\WINDOWS\SYSTEM32\java.exe", "", "Bungee") Global $hwnd0 = WinGetHandle("Bungee") EndIf EndIf _WinAPI_SetWindowLong($hwnd0, $GWL_EXSTYLE, $WS_EX_MDICHILD) _WinAPI_SetParent($hwnd0, $GUI) WinMove($hwnd0, "", 0, 0, 340, 300) </code></pre> <p>Still need to find a way to use ControlSend to the child windows :/</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload