Wie im Titel beschrieben will ich z.B. manuell ne session CMD ausführen dann wenn ich da z.b. help oder dir eingebe will ich alles was ich da reinschreibe mitgeloggt wird ich hab auch einen script dafür gemacht nur klappt das leider nicht!
theoretisch müsste is ja so gehen:
Spoiler anzeigen
#include <GUIConstants.au3>
#include "constants.au3"
$gui = GUICreate("console stuff")
$edit = GUICtrlCreateEdit("", 10, 10, 300, 300, BitOr($WS_VSCROLL, $WS_HSCROLL,$ES_READONLY))
GUISetState()
$pid = Run("cmd","", @SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]While 1
$lineout = StdoutRead($pid)
GUICtrlSetData($edit, $lineout, 1)
Wend
Und hier einmal wies funktioniert aber jedes mal ne neue dosbox gestartet wird
Spoiler anzeigen
#include <GUIConstants.au3>
#include "constants.au3"
$gui = GUICreate("console stuff")
$edit = GUICtrlCreateEdit("", 10, 10, 300, 300, BitOr($WS_VSCROLL, $WS_HSCROLL,$ES_READONLY))
$go = GuiCtrlCreateButton("abfragen",310,20,60)
$cmd = GuiCtrlCreateInput(" /c dir",310,50,60,20)
GUISetState()
$ping = 0
While 1
$getmsg = GuiGetMsg()
If $go = $getmsg then
$befehl = GuiCtrlRead($cmd)
$ping = Run(@ComSpec & $Befehl, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
EndIf
$lineout = StdoutRead($ping)
GUICtrlSetData($edit, $lineout, 1)
WEnd
Wäre für Tipps / lösungen dankbar =)