Code:
$vClient = InputBox("Window", "Window for key pressing:")
$vKey = InputBox("Key", "Key for key pressing (seconds):")
$vDelay = InputBox("Delay", "Delay for key pressing:")
If $vClient <> "" And $vKey <> "" Then
While 1
If WinExists($vClient) Then
ControlSend($vClient, "", "Edit1", $vKey)
Sleep($vDelay) * 1000
EndIf
Sleep(10)
WEnd
EndIf
The above AutoIT source is very basic, but it should be what you're looking for.