I'm looking for a way to programmatically power off multiple monitors.
Note: This doesn't mean power off ALL monitors.
The languages I'm currently able to compile in with my current enviorment is python/C/C++. I am aware of the easy C++ way of.
SendMessage(GetConsoleWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 2);
However this powers off all the monitors the system has on, which isn't the result I'm after.
Let's say I have a Window with the name "Application Window", now I want to power off all of the monitors that does not have this app window open.
Note: Ideally it'd be implemented with python, however not needed.
Edit: Found this, however I'm unable to recreate it and have the desired functionality.