Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to batch a process that requires me to automate some key presses. All I need to be able to do is hit the enter key, wait 5 seconds, hit the enter key again, wait 5 minutes, and then cmd + w to close the current window.

In the MacOS 9 days I would use OneClick by WestCode software:

Is there a similar tool for MacOS X, Snow Leopard specifically? In this particular instance I do not need to can the focus of windows or anything else. I just need to automate key presses within a program at various intervals.

share|improve this question

Have you tried to use automator and its record actions feature? Described here

share|improve this answer
The "Watch Me Do" action in Automator doesn't record everything, unfortunately. – John Kramlich May 25 '11 at 23:00
up vote 0 down vote accepted

The closest thing I could find was to use a combination of Automator's "Watch Me Do" actions and AppleScript to simulate key presses. I wrote a tutorial and posted my Automator workflow here:

More info about AppleScript "System Events" for simulating key presses here:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.