Skip to content Skip to sidebar Skip to footer

How Can I Detect Brightness Changes Using Python And Wmi On Windows 10?

I am trying to detect brightness changes on my laptop using a set of tools called Windows Management Instrumentation (WMI), particularly an event class called WmiMonitorBrightnessE

Solution 1:

Solved it as such

import wmi
c = wmi.WMI(namespace='wmi')
print_job_watcher = c.WmiMonitorBrightnessEvent.watch_for (
  notification_type="Modification",
  delay_secs=1
)

event_happened = print_job_watcher ()
print(event_happened)

Post a Comment for "How Can I Detect Brightness Changes Using Python And Wmi On Windows 10?"