Hallo,
ich habe folgenden Code:
[autoit]#include <GUIConstantsEx.au3>
[/autoit][autoit][/autoit][autoit]GuiCreate("Test")
GUISetState(@SW_SHOW)
$iniFilename = @ScriptDir & "\settings.ini"
[/autoit][autoit][/autoit][autoit]$windowInput = GUICtrlCreateInput(IniRead($iniFilename, "settings", "window", ""), 50, 20)
$keys = GUICtrlCreateInput(IniRead($iniFilename, "settings", "keys", ""), 50, 50)
$startTime = GUICtrlCreateInput(IniRead($iniFilename, "settings", "startTime", ""), 50, 80)
$endTime = GUICtrlCreateInput(IniRead($iniFilename, "settings", "endTime", ""), 50, 110)
$controlInput = GUICtrlCreateInput(IniRead($iniFilename, "settings", "control", ""), 50, 140)
$startButton = GUICtrlCreateButton("Start", 5, 5)
$endButton = GUICtrlCreateButton("Stop", 5, 50)
$status = GUICtrlCreateLabel("Nicht gestartet", 100, 200)
$started = false
$wait = 0
$a = GUICtrlCreateButton("Sadsf", 200, 200)
[/autoit][autoit][/autoit][autoit][/autoit][autoit]While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $startButton
$started = true
GUICtrlSetData($status, "Gestartet")
Case $endButton
msgbox(0, "a", "a")
$started = false
GUICtrlSetData($status, "Nicht Gestartet")
Case $a
msgbox(0, "a", "a")
EndSwitch
if $started = True Then
if $wait <> 0 Then
Sleep( $wait )
EndIf
ControlSend(GUICtrlRead($windowInput), "", GUICtrlRead($controlInput), GUICtrlRead($keys))
$wait = Random(GUICtrlRead($startTime), GUICtrlRead($endTime)) * 1000
EndIf
WEnd
Wenn ich jetzt auf Start klicke, startet auch alles, so wie ich will,
allerdings kann ich dann weder Beenden noch auf das Kreuz vom Fenster klicken.
Hat jemand ne Idee wie ich das behebe?
mfg dragon_killer