e.g. Set screen brightness to 50% when running a game or to 30% when watching a youtube video or to 0% after 6pm.
Hardware brightness (so the actual brightness of the LED's in the display, not software brightness which just washes the colour out) is adjustable through a program called ScreenBright and it has a command line interface.
So I'm looking for a program that can monitor when I program is run or when certain content is being output to the screen and then trigger a batch file with the required commands for brightness.
Task Scheduler doesn't seem able to do this, although it would manage the last example as it's time based.