/Class_Monitor

Monitor Class (WinAPI)

Primary LanguageAutoHotkeyThe UnlicenseUnlicense

Class_Monitor

AutoHotkey wrapper for Monitor Configuration API Functions (msdn-docs)

Examples

Retrieves a (particular) monitor's minimum, maximum, and current brightness settings.

for k, v in Monitor.GetBrightness("\\.\DISPLAY2")   ; or just "2"
	MsgBox % k ": " v

Retrieves the defaults (primary) monitor's minimum, maximum, and current brightness settings.

for k, v in Monitor.GetBrightness()   ; empty parameter
	MsgBox % k ": " v

Retrieves a (particular) monitor's minimum, maximum, and current contrast settings.

for k, v in Monitor.GetContrast("\\.\DISPLAY2")   ; or just "2"
	MsgBox % k ": " v

Retrieves the defaults (primary) monitor's minimum, maximum, and current contrast settings.

for k, v in Monitor.GetContrast()   ; empty parameter
	MsgBox % k ": " v

Retrieves a (particular) monitor's red, green and blue gamma ramp settings.

for k, v in Monitor.GetGammaRamp("\\.\DISPLAY2")   ; or just "2"
	MsgBox % k ": " v

Retrieves the defaults (primary) monitor's red, green and blue gamma ramp settings.

for k, v in Monitor.GetGammaRamp()   ; empty parameter
	MsgBox % k ": " v

Sets a (particular) monitor's brightness value.

Monitor.SetBrightness(50, "\\.\DISPLAY2")   ; or just "2"

Sets the defaults (primary) monitor's brightness value.

Monitor.SetBrightness(50)   ; empty parameter

Sets a (particular) monitor's contrast value.

Monitor.SetContrast(50, "\\.\DISPLAY2")   ; or just "2"

Sets the defaults (primary) monitor's contrast value.

Monitor.SetContrast(50)   ; empty parameter

Sets a (particular) monitor's red, green and blue gamma ramp value.

Monitor.SetGammaRamp(100, 100, 80, "\\.\DISPLAY2")   ; or just "2"

Sets the defaults (primary) monitor's red, green and blue gamma ramp value.

Monitor.SetGammaRamp(100, 100, 80)   ; empty parameter

Restores a (particular) monitor's settings to their factory defaults (brightness and contrast).

Monitor.RestoreFactoryDefault(\\.\DISPLAY2")   ; or just "2"

Restores the defaults (primary) monitor's settings to their factory defaults (brightness and contrast).

Monitor.RestoreFactoryDefault()   ; empty parameter

AHK v2 rewrite

GitHub by tigerlily-dev

Questions / Bugs / Issues

Report any bugs or issues on the AHK Thread. Same for any questions.

Copyright and License

The Unlicense

Donations (PayPal)

Donations are appreciated if I could help you