开发者

log keydown events using applescript

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 wi开发者_如何转开发ndow? Where is a gool tutorial to start on something like this? I have programming experience, but not in Applescript or Objective-C

Thanks!


You can't do it with AppleScript, but I have code in Objective-C that does this. Shoot me an email (rwilcox@wilcoxd.com) 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜