Hallo,
ich habe eine Fehlermeldung, wenn ich mein Script ausführen möchte, jedoch verstehe ich nicht, wo der Fehler liegen soll.
Script :
Könntet ihr mir bitte helfen und mir erzählen, was ich verändert muss, damit es funzt?
ich habe eine Fehlermeldung, wenn ich mein Script ausführen möchte, jedoch verstehe ich nicht, wo der Fehler liegen soll.
Script :
Code:
#include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form2 = GUICreate("", 620, 657, 182, 144, $WS_POPUP)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 633, 529)
GUICtrlSetData(-1, "")
$Input1 = GUICtrlCreateInput("", 0, 560, 513, 21)
$senden = GUICtrlCreateButton("senden", 528, 560, 75, 25, $WS_GROUP)
$Beenden = GUICtrlCreateButton("Beenden", 528, 608, 75, 25, $WS_GROUP)
$Pic1 = GUICtrlCreatePic("Background.jpg", 0, 520, 636, 360, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
Local $sBuffer
Dim $Text
Dim $Fragen
Dim $Antworten
_FileReadToArray("Antwort.txt","|", $Fragen)
_FileReadToArray("Frage.txt", "|", $Antworten)
While (TRUE)
Switch (GUIGetMsg( ))
Case $GUI_EVENT_CLOSE
Exit
Case $senden
$sBuffer = GuiCtrlRead($Input1)
For $i = 1 To UBound($Fragen) - 1
If $Fragen[$i] = $sBuffer Then
If StringRegExp ($sBuffer, $Fragen[$i]) Then
Local $iRnd = Random(1, 2, 1)
Switch $iRnd
GUICtrlSetData($Edit1, $Antworten[$i])
EndIf
EndIf
EndSwitch
WEnd