Can I trigger an event with a full-screen application?

Basically, I want my lights to dim when I start playing a PC game. I figure that would just be a matter of sending the proper signal when a full-screen application is detected. Does this seem possible?

There are a few things that might not work if you do it that way e.g. borderless window mode will not be detected.

My attempt at this would probably look like this create a batch file for the game or a general one.

Batch for game:

  • Call REST-API of HA with something like curl for windows to dim lights
  • Start Game with (START /WAIT GAME.exe)
  • Call REST-API of HA with something like curl for windows to brighten lights

General batch one batch for “Call REST-API of HA with something like curl for windows to dim lights” and one for “Call REST-API of HA with something like curl for windows to brighten lights”.

~Cheers

OK thanks. Might just have to create a couple basic exe’s that I can run before starting up the game.

I know there are many programs that are able to detect accelerated windows. Might have to see if I can write a rivatuner statistics server plugin to run a script. It isn’t exactly pressing, but it would be an extra level of awesome.