Code:
Run("notepad.exe")
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
local $senden = false
$Form1 = GUICreate("", 503, 287, 192, 124)
GUISetBkColor(0x00E0FFFF) ; Ändert die Hintergrundfarbe
$input =GUICtrlCreateInput("Hier dein Text rein ...", 32, 208, 425, 21)
$Start = GUICtrlCreateButton("Start", 40, 72, 137, 41, 0)
$Stop = GUICtrlCreateButton("Stop", 288, 72, 137, 41, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Start
$senden = true
Case $Stop
$senden = false
EndSwitch
If $senden = true then ControlSend("[CLASS:Notepad]", "", "Edit1", GUICtrlRead($input))
If $senden = true then ControlSend("[CLASS:Notepad]", "", "Edit1", "{enter}")
WEnd