
If you're having trouble with your computer locking up or going to sleep, caffeine keeps it awake. It works by simulating keypresses every 59 seconds, so your computer won't lock the screen or activate the screensaver because it thinks you're still working on the keyboard.
The icon shown above is the leftmost icon on the taskbar, and that's all you see. Double-clicking the icon empties the coffee maker (that's the icon) and temporarily disables the program. Double-clicking it again refills the machine and keeps it awake.
By default, the application starts active and runs every 59 seconds. There are some command-line switches you can use to change this behavior:
xx - xx is a number that sets the number of seconds between simulated keystrokes. This should be the first text on the command line.
-startoff - application startups disabled.
-exitafter:xx - the application will exit after xx minutes
-activefor:xx - the application will be disabled after xx minutes
-inactivefor:xx - the application will be activated after xx minutes
-appexit - terminates the currently running instance of the application
-appon - activates the currently running instance of the application
-appoff - disables the currently running instance of the application
-apptoggle - toggles the running state of the currently running instance of the app
-apptoggleshowdlg - toggles the running state and shows the dialog box
-replace - closes the current running instance and replaces it
-noicon - does not show the task tray icon
-useshift - simulates the shift key instead of F15
-allowss - disables sleep, but allows the screensaver to start
-stes - Tell Windows to stay awake, don't use F15
-showdlg - shows a dialog box indicating whether caffeine is active or not
-ontaskbar - show taskbar button (use with -showdlg)
-key:xx - simulate using virtual key code xx
Note: The codes on the linked page are in Hex, convert them to decimal to use with this parameter
-keypress - simulates a full keypress, not just a keypress event
-oldicons - use more colorful tray icons
-lighticons - always use light icons
-darkicons - always use dark icons
-watchwindow:xx - only active when a window with xx in its title is found
-activeperiods:xxxx-yyyy - active only during specified hours, for example 09:00-16:59 or 07:30-12:00,13:00-15:00,15:30-18:00
-onac - enabled only when the computer is running on AC power (plugged in)
-cpu:xx - Active until CPU drops below xx%
-notify - generates a notification when the application state changes between active and inactive