Was Habe ich falsch gemacht es soll auch eine schleife geben.
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Tommy\Desktop\Nostale Bot V1.kxf
$Form1 = GUICreate("Nostale Bot V1.0", 540, 148, 267, 117)
$Input1 = GUICtrlCreateInput("", 320, 16, 121, 21)
$Input2 = GUICtrlCreateInput("", 320, 56, 121, 21)
$Input3 = GUICtrlCreateInput("", 320, 88, 121, 21)
$Label1 = GUICtrlCreateLabel("In Welchen Abstand soll die Leertaste gedrückt werden?", 32, 16, 272, 17)
$Label2 = GUICtrlCreateLabel("In Welchen Abstand solll X gedrückt werden?", 80, 56, 223, 17)
$Label3 = GUICtrlCreateLabel("In Welchen Abstand Soll 9 Gedrückt werden?", 80, 88, 221, 17)
$Button1 = GUICtrlCreateButton("Start", 448, 16, 75, 25)
$Button2 = GUICtrlCreateButton("Start", 448, 56, 75, 25)
$Button3 = GUICtrlCreateButton("Start", 448, 88, 75, 25)
$Button4 = GUICtrlCreateButton("Ende", 280, 120, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Send ("{Space}") ;Sende Leertaste
$Sleep = GUICtrlRead("Input1") ;Sleep Time
Case $Button2
Send ("x") ;Sende X
$Sleep = GUICtrlRead("Input2")
Case $Button3
Send ("9") ;Sende 9
$Sleep = GUICtrlRead("Input3")
Case $Button4
Exit
EndSwitch
WEnd