Entweder ControlSend versuchen, außerdem würde ich nicht Exitten sondern folgendes machen
Code:
HotKeySet("{F1}","_Start")
HotKeySet("{F2}","_Stop")
while Sleep(10)
WEnd
Func _Start()
While True
Send("{UP}")
WEnd
EndFunc
func _Stop()
ShellExecute(@ScriptFullPath)
Exit
EndFunc