views:

159

answers:

2

Hi

I'm interested in writing an applescript project that records the date on every keypress.

Can applescripts read this information while they're in the background? Or must they always be the selected window? Where is a gool tutorial to start on something like this? I have programming experience, but not in Applescript or Objective-C

Thanks!

A: 

I'm pretty sure you can't create a generic key capture using Applescript. Applescript really has no internal functionality, it is just a means of controlling application depending on the applications own functionality. Since there isn't a generic key capture app, Applescript can't really do it.

You used to be able to write keyboard input plug-ins put they took that out of 10.6 mostly likely for security reasons.

I would suggesting looking at some of the deeper Unix functions.

TechZen
A: 

You can't do it with AppleScript, but I have code in Objective-C that does this. Shoot me an email ([email protected]) if you are interested and maybe I can help you with your project... I've deployed this code with another client so it's pretty time-tested.

RyanWilcox