hi,
ich hab mal ein kleines Problem.
Und zwar hab ich z.B. sowas hier:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$send = False
$Form1 = GUICreate("Form1", 214, 244, 193, 125)
$Input2 = GUICtrlCreateInput("Interval", 40, 48, 121, 21)
$Input1 = GUICtrlCreateInput("Titel", 40, 88, 121, 21)
$Button1 = GUICtrlCreateButton("Send Blahs", 56, 136, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If WinExists(GUICtrlRead($Input1)) = False Then
ToolTip('Es wurde kein Fenster mit dem eingegebenen Titel gefunden!', 0, 0)
Sleep(1500)
ToolTip("")
Else
If Not WinActive(GUICtrlRead($Input1)) Then WinActivate(GUICtrlRead($Input1))
WinWaitActive(GUICtrlRead($Input1))
ControlFocus(GUICtrlRead($Input1), "", "")
$fucus = ControlGetFocus(GUICtrlRead($Input1))
$send = Not $send
If $send Then
GUICtrlSetData($Button1, "Aufhörn")
Else
GUICtrlSetData($Button1, "Send Blahs")
EndIf
EndIf
EndSwitch
If $send Then
ControlSend(GUICtrlRead($Input1), "", $fucus, "Blah")
Sleep(GUICtrlRead($Input2))
EndIf
WEnd
Theoretisch müsste man das senden beenden können indem man nochma auf den Button drückt, aber irgentwie funktioniert es nicht, genauso wie $GUI_EVENT_CLOSE.
Meiner meinung nach liegs am Sleep befehl... Hat jemand eine ahnung wie man das GUI betätigen könnte?