#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.5 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include #include Local $hDLL = DLLOpen ("user32.dll") While 1 If _IsPressed("4C", $hdll) Then Sleep(1) Send("{RIGHT}") ElseIf _IsPressed("1B", $hDLL) Then MsgBox($MB_SYSTEMMODAL, "_IsPressed", "The Esc Key was pressed, therefore we will close the application.") ExitLoop EndIf Sleep(250) WEnd