Script :
Spoiler anzeigen
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <Misc.au3>
Global $hWnd
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]HotKeySet("{ENTER}","pressed")
[/autoit] [autoit][/autoit] [autoit]Global $Konsole = _Konsol_Create("Konsole","Test")
;=================================================================================================
; Function: _Konsol_Create
; Varibles: $title = Titel der Konsole
; $text = Text des Labels
; Author: SB
;=================================================================================================
Func _Konsol_Create($title,$text)
Local $dll = DllOpen("user32.dll")
Dim $hWnd[2]
$hWnd[0] = GUICreate($title,500,300)
GUISEtBkColor(0x000000)
$hWnd[1] = GUICtrlCreateEdit("",0,0,500,300,BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL), 0)
GUICtrlSETBKColor(-1,0x000000)
GUICTrlSETColor(-1,0xDCDCDC)
GUICtrlSEtFont(-1,10,400,17,"Georgia")
GUISetState(@SW_SHOW)
While 1
Switch GUIGETMSG()
Case -3
GUISetState(@SW_HIDE,$hWnd[0])
Exitloop
EndSwitch
WEnd
Return $hWnd
EndFunc
Func pressed()
Dim $Befehle[5]
$Befehle[0] = "time"
$Befehle[1] = "date"
$Befehle[2] = "ip"
$Befehle[3] = "pcname"
$Befehle[4] = "username"
$read = GUICTrlREad($hWnd[1])
$Split = StringSplit($read, @CRLF)
$uUbound = UBound($Split)
$text = $Split[$uUbound-1]
IF $Split[$uUbound-1] = "" Then
GUICtrlSetData($hWnd[1],$read & @CRLF & @CRLF&" "& "Bitte Text Eingeben"& @CRLF& @Crlf )
Endif
If $Split[$uUbound-1] = $Befehle[0] Or $text = $Befehle[0] & "" Or $text = $Befehle[0] & " " Then
GUICtrlSetData($hWnd[1],$read & @CRLF & " " & @Hour & ":" & @Min & @CRLF & @Crlf )
Endif
If $text = $Befehle[1] Or $text = $Befehle[1] & "" Or $text = $Befehle[1] & " " Then
GUICtrlSetData($hWnd[1],$read & @CRLF & " " & @MDAY & ":" & @Mon & ":"& @Year & @CRLF & @Crlf )
Endif
If $text = $Befehle[2] Or $text = $Befehle[2] & "" Or $text = $Befehle[2] & " " Then
GUICtrlSetData($hWnd[1],$read & @CRLF & " " & @IPAddress1 & @CRLF & @Crlf )
Endif
If $text = $Befehle[3] Or $text = $Befehle[3] & "" Or $text = $Befehle[3] & " " Then
GUICtrlSetData($hWnd[1],$read & @CRLF & " " & @ComputerName & @CRLF & @Crlf )
Endif
If $text = $Befehle[4] Or $text = $Befehle[4] & "" Or $text = $Befehle[4] & " " Then
GUICtrlSetData($hWnd[1],$read & @CRLF & " " & @Username & @CRLF & @Crlf )
Endif
EndFunc
Wie kann ich es machen , dass alte Befehle unlöschbar sind
Ich hoffe mir kann jemand helfen