Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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: http://www.macworld.com/article/15791/2000/12/13reviews2oneclick.html

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

2 Answers 2

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:

http://www.johnkramlich.com/blog/2011/05/24/batch-exporting-adobe-flash-flas-to-quicktime-movies/

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

http://en.wikibooks.org/wiki/AppleScript_Programming/System_Events

share|improve this answer

Your Answer

 
discard

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.