Hi @all
Wie kann ich nur die letzt zeile eines Edit feldes auslesen
Problem habe ich hier
Spoiler anzeigen
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <Misc.au3>
Global $hWnd
Global $Befehle
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)
Dim $Befehle[5]
Local $dll = DllOpen("user32.dll")
Dim $hWnd[2]
$Befehle[0] = "Zeit"
$Befehle[1] = "Datum"
$Befehle[2] = "Ip"
$Befehle[3] = "PC-Name"
$Befehle[4] = "Username"
$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()
$read = GUICTrlREad($hWnd[1])
IF $read = "" Then
GUICtrlSetData($hWnd[1],$read & @CRLF & @CRLF&"Bitte Text Eingeben"& @CRLF )
Endif
If $read = $Befehle[0] Then
GUICtrlSetData($hWnd[1],$read & @CRLF & " " & @Hour & ":" & @Min & @CRLF & @Crlf )
Endif
EndFunc
Da wenn schon ein mal enter gedrückt wurde , dann wird ja alles ausgelesen und alle befehle sind miteinander und antworten und leerzeilen
Ich hoffe ihr könnt mir helfen