Is there a way or a 3rd party application which would let me specify, for example, that I want it to send a keyboard event (so that it has the same effect as physically hitting the key on the keyboard) every 5 seconds?
So, for example, I could tell it to hit K every 5 seconds, 15 times in total?
Basically, I'm looking for something like AutoHotkey but for OS X.
Best Answer
Here's an AppleScript to do what you want:
You can inline it in a shell script like this:
(Thanks to @houbysoft for the
echo "script" | osacript
syntax!)