LonelyTV Posted August 16, 2009 Share Posted August 16, 2009 Hello, I know that Growl and AppleScript work well together, but I'm curious if there is a possibility to write a script that detects the caps lock being on or off. I found several on Google, but none of them seemed to work even when I attempted to edit them. The one I found doesn't "register" itself with Growl and I'm baffled if that's the reason why it doesn't work right. When I run it from the AppleScript editor it either asks me where "KeyboardViewerServer" is at (which I can't locate) or does nothing. Which leads me to believe it's a bum script and that caps lock detection isn't possible. Any help or advice would be great! Thanks. Below is the script I had found: on idle tell application "System Events" tell application "KeyboardViewerServer" to activate set CAPS to (get value of checkbox "⇪" of window 1 of application process "KeyboardViewerServer") end tell if CAPS is 1 then tell application "GrowlHelperApp" to notify with name "Caps Lock Notification" title "Caps Lock" description "" application name "Caps Lock Notification" image from location "/Users/<user name>/Scripts/Growl Alerts/Caps Lock Icon.png" return 2 -- this seems to be a good compromise for response time end idle Link to comment Share on other sites More sharing options...
Recommended Posts