Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Last active November 7, 2018 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TLMcode/305ea08e64d0c96d4f1c6bf8998125ca to your computer and use it in GitHub Desktop.
Save TLMcode/305ea08e64d0c96d4f1c6bf8998125ca to your computer and use it in GitHub Desktop.
DispBrtObj := new DispBrtClass()
Return
class DispBrtClass
{
__New()
{
ComObjConnect( this.wSinkObj := ComObjCreate( "WbemScripting.SWbemSink" ), this.EventHandler )
ComObjGet( "winmgmts:\\.\root\WMI" ).ExecNotificationQueryAsync( this.wSinkObj, "SELECT * FROM WmiMonitorBrightnessEvent")
}
class EventHandler
{
OnObjectReady( eventObj )
{
Coordmode Tooltip, Screen
Tooltip % "Display Brightness: " eventObj.Brightness, 10, 10
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment