#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. Loop 30 { Send +^d ;Sleep 2000 Input, klawisz, T2 if klawisz { MsgBox, koniec, bo nacisnales "%klawisz%" ExitApp } }