Schreibt einen Text in ein Edit-Control
#include <GuiEdit.au3>
_GUICtrlEdit_SetText ( $hWnd, $sText )
$hWnd | Control-ID / Handle des Controls |
$sText | String welcher im Edit-Control geschrieben werden soll |
- - - - - - - - Erklärung der Controls - - - - - - - -
_GUICtrlEdit_AppendText, _GUICtrlEdit_GetText
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Erstellt eine GUI
GUICreate("Edit: Setzt und ermittelt Text (v" & @AutoItVersion & ")", 400, 300)
Local $idEdit = GUICtrlCreateEdit("", 2, 2, 394, 268)
GUISetState(@SW_SHOW)
; Setzt den Text
_GUICtrlEdit_SetText($idEdit, "Dies ist ein Test" & @CRLF & "Eine andere Zeile" & @CRLF & "An das Ende anhängen?")
; Ermittelt den Text
MsgBox($MB_SYSTEMMODAL, "Information", _GUICtrlEdit_GetText($idEdit))
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example