''Face of the Dark Palmira'' and ''The Other Amongst Others'' in English ►

◄ Various lesser-seen (in the UK) every day carry items

2012-01-07 📌 AutoHotkey example: a f.lux alternative to warm your screen display

Tags All Tech

There's no real purpose to this, because RedShiftGUI does what it can do and more... it's just an example of using AutoHotkey to create a tray-based application that executes tasks from a menu.

The utility we're using to illustrate with is RedShift, which adjusts your monitor's colour temperature (by adjusting gamma settings in software) to be kinder to your eyes late at night; because staring into a bright, blue-tinted screen doesn't exactly help your body clock. You can get it here: http://jonls.dk/redshift/

Put redshift.exe into the same directory as the script.

It should be fairly self-explanatory, or easy enough to follow with the AHK documentation. We want a persistent application that shows our menu rather than the default one. Each menu option calls one or more command-line strings whilst hiding any windows created, and waits for the executed command to complete before moving on. (Note that for the lowered colour temperature option, we first clear the gamma settings because otherwise the hibernate function in XP will interfere.)

You can build this into an executable using the "Convert .ahk to .exe" shortcut installed with AutoHotkey. For an icon, I started with the lightbulb from the Silk icon set and adjusted the colour balance in XnView.

RedShiftTray.exe

💬 Comments are off, but you can use the mail form to contact or see the about page for social media links.