Hi zusammen, ich möchte eigentlich ganz Simpel den Inhalt von der TextArea "Edit1" vergleichen. Sobald der Inhalt sich ändert soll die Funktion setContentEdit2 aufgerufen werden und baaba ausgegeben werden.
Derzeit wird beim Programmstart bereits baaba ausgegeben obwohl der Inhalt derselbe ist. Hoffe mir hilft jemand!
Spoiler anzeigen
#include
#include
#include
#include
#include
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("PDF to LaTex", 613, 782, 190, 119)
$Tab1 = GUICtrlCreateTab(8, 8, 601, 737)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Input")
$Edit1 = GUICtrlCreateEdit("", 16, 40, 585, 697, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL))
GUICtrlSetData(-1, "Edit1")
$TabSheet2 = GUICtrlCreateTabItem("Output LaTex")
$Edit2 = GUICtrlCreateEdit("", 16, 40, 585, 697, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL))
GUICtrlSetData(-1, "Edit2")
$TabSheet3 = GUICtrlCreateTabItem("Output HTML")
$Edit3 = GUICtrlCreateEdit("", 16, 40, 585, 697, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL))
GUICtrlSetData(-1, "Edit3")
GUICtrlCreateTabItem("")
$Label1 = GUICtrlCreateLabel("(C)opyright by Cédric Steiger", 212, 752, 205, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$ContentEdit1 = "Edit1"
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
If $ContentEdit1 <> GUICtrlGetState($Edit1) Then
setContentEdit2()
EndIf
WEnd
Func setContentEdit2()
ConsoleWrite("baaba")
EndFunc