Hi @all ich habe dieses jahr mit VC++ ein wenig begonnen und dort gibt es ja die Windows-Konsolen-Andwendung das habe ich haber in auotit nicht gefunden und jetzt habe ich mal ein kleines Script dazu geschreiben mit 9 Funktionen um etwas ähnliches zu schreiben
Ich hoffe es gefällt euch
Funktionen
;=================================================================================================
; Function: _Konsol_Create
; Varibles: $title = Titel der Konsole
; Author: SB
;=================================================================================================
Func _Konsol_Create($title,$Hanle)
Local $hWnd[4]
$hWnd[0] = GUICreate($title,500,300)
GUISEtBkColor(0x000000)
$hWnd[1] = GUICTrlCreateLabel("",10,10,480,200)
GUICTrlSetColor(-1,0xffffff)
GUICtrlSetFont($hWnd[1],12)
$hWnd[2] = GUICtrlCreateInput("",10,200,480,20)
GUICtrlSETBKColor(-1,0x000000)
GUICTrlSETColor(-1,0xFFFFFF)
GUICtrlSEtState($hWnd[2],$GUI_HIDE)
$hWnd[3] = GUICtrlCreateButton("",10,240,150,30)
GUICtrlSetState($hWnd[3],$GUI_HIDE)
GUISwitch ($Hanle)
Return $hWnd
EndFunc
;=================================================================================================
; Function: _Konsol_SetText
; Varibles: $hWnd = Handel der Konsole von _Konsol_Create
; $text = Text der Beschriftung der Konsole
; Author: SB
;=================================================================================================
Func _Konsol_SetText($hWnd,$text)
GUICtrlSetData($hWnd[1],$text)
EndFunc
;=================================================================================================
; Function: _Konsol_SetInputText
; Varibles: $hWnd = handel der _Konsol
; $text = Text der in die Input geschrieben werden soll
; Author: SB
;=================================================================================================
Func _Konsol_SetInputText($hWnd,$text)
GUICTrlSEtDATA($hWnd[2],$text)
EndFunc
;=================================================================================================
; Function: _Konsol_SetState
; Varibles: $hWnd = handel der _Konsol_Create
; $state = State des Fensters zb. @SW_HIDE und @SW_SHOW
; Author: SB
;=================================================================================================
Func _Konsol_SetState ($hWnd,$State)
GUISetState($State,$hWnd[0])
EndFunc
;=================================================================================================
; Function: _Konsol_CreateInput
; Varibles: $hWnd = Handel der _Konsol_Create
; Author: SB
;=================================================================================================
Func _Konsol_CreateInput($hWnd)
GUICtrlSETState($hWnd[2],$GUI_SHOW)
EndFunc
;=================================================================================================
; Function: _Konsol_DeleteInput
; Varibles: $hWnd = Handel der _Konsol_Create
; Author: SB
;=================================================================================================
Func _Konsol_DeleteInput($hWnd)
GUICtrlSEtState($hWnd[2],$GUI_HIDE)
EndFunc
;=================================================================================================
; Function: _Konsol_CreateButton
; Varibles: $hWnd = Handel der _Konsol_Create
; $text = Text mit dem der Button beschriftet werden soll
; Author: SB
;=================================================================================================
Func _Konsol_CreateButton($hWnd,$text = "Ok")
GUICtrlSetState($hWnd[3],$GUI_SHOW)
GUICtrlSetData($hWnd[3],$text)
EndFunc
;=================================================================================================
; Function: _Konsol_DeleteButton
; Varibles: $hWnd = Handel der _Konsol_Create
; Author: SB
;=================================================================================================
Func _Konsol_DeleteButton($hWnd)
GUICtrlSetState($hWnd[3],$GUI_HIDE)
EndFunc
;=================================================================================================
; Function: _Konsol_Read
; Varibles: $hWnd = Handel der _Konsol_Create
; Author: SB
;=================================================================================================
Func _Konsol_Read($hWnd)
$readen = GUICtrlRead($hWnd[2])
return $readen
EndFunc
;ein danke an Jam00
Beispiel
#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]$hWnd = GUICreate("GUI",300,300)
$info = GUICtrlCreateButton("Info",10,10)
GUISETSTATE()
$Konsole = _Konsol_Create("Beispielconsole",$hWnd)
While 1
$nMsg = GUIGETMSG(1)
Switch $nMsg[1]
Case $hWnd
Switch $nMsg[0]
Case -3
Exit
Case $info
_Konsol_SetState($Konsole,@SW_SHOW)
_Konsol_SetText($Konsole,"Hallo")
_Konsol_SetInputText($Konsole,"Dies ist der Input Text")
_Konsol_CreateInput($Konsole)
_Konsol_CreateButton($Konsole,"Hallo ich bin der Button")
EndSwitch
Case $Konsole[0]
Switch $nMsg[0]
Case -3
_Konsol_SetState($Konsole,@SW_HIDE)
Case $Konsole[3]
$read = _Konsol_Read($Konsole)
MsgBox(0,""," In der Input steht:" & @CRLF & '"' & $read & '"')
EndSwitch
EndSwitch
WEnd
Ich hoffe es kann jemand gebrauchen