I love caffeine, but I really wish it were just a keyboard shortcut or perhaps a command line / terminal command. Has anyone figured out a way to activate / deactivate Caffeine using another method besides clicking?

enter image description here

link|improve this question

Ask the developer to implement a shortcut ? Otherwise you have two options : NO, or you can make a UI applescript hack to access the menubar and click it for you. – Kassym Dorsel Oct 26 '11 at 22:05
feedback

1 Answer

up vote 2 down vote accepted

Caffeine has a tiny AppleScript dictionary:

tell application "Caffeine"
    if active then
        turn off
    else
        turn on
    end if
end tell

Assign a shortcut to running a script in OS X - Super User

link|improve this answer
How can you tell what is in the application's Applescript dictionary? – cwd Oct 27 '11 at 19:27
1  
@cwd Open Dictionary (⇧⌘O) in AppleScript Editor. – Lri Oct 28 '11 at 4:25
feedback

Your Answer

 
or
required, but never shown

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