Fügt Text ein
#include <GuiEdit.au3>
_GUICtrlEdit_InsertText ( $hWnd, $sText [, $iIndex = -1] )
$hWnd | Control-ID / Handle des Controls |
$sText | einzufügender String |
$iIndex | [optional] Zeichenposition |
- - - - - - - - Erklärung der Controls - - - - - - - -
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local $idEdit
Local $sWow64 = ""
If @AutoItX64 Then $sWow64 = "\Wow6432Node"
Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\AutoIt v3\AutoIt", "InstallDir") & "\include\changelog.txt"
; Erstellt eine GUI
GUICreate("Edit: Text einfügen", 400, 300)
$idEdit = GUICtrlCreateEdit("", 2, 2, 394, 268, BitOR($ES_WANTRETURN, $WS_VSCROLL))
GUISetState(@SW_SHOW)
; Ränder setzen
_GUICtrlEdit_SetMargins($idEdit, BitOR($EC_LEFTMARGIN, $EC_RIGHTMARGIN), 10, 10)
; Text setzen
_GUICtrlEdit_SetText($idEdit, FileRead($sFile))
; Text einfügen
_GUICtrlEdit_InsertText($idEdit, "*** Hervorragende UDFs ***" & @CRLF & @CRLF, 0)
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example