Code: Select all
down::Monitor.SetBrightness(128, 128, 128) ; Red - Green - Blue
up::Monitor.SetBrightness(10, 10, 10) ; Red - Green - Blue
Code: Select all
down::Monitor.SetBrightness(128, 128, 128) ; Red - Green - Blue
up::Monitor.SetBrightness(10, 10, 10) ; Red - Green - Blue
Code: Select all
; GLOBAL SETTINGS ===============================================================================================================
#NoEnv
#SingleInstance Force
#Persistent
SetBatchLines -1
; SCRIPT ========================================================================================================================
; Win + Numpad Add (+) -> Set Brightness incremental by 1
#NumpadAdd::
CLR := Monitor.GetBrightness()
Monitor.SetBrightness(CLR.Red + 1, CLR.Green + 1, CLR.Blue + 1)
return
; Win + Numpad Sub (-) -> Set Brightness decremental by 1
#NumpadSub::
CLR := Monitor.GetBrightness()
Monitor.SetBrightness(CLR.Red - 1, CLR.Green - 1, CLR.Blue - 1)
return
; Win + Numpad Mult (*) -> Set Brightness to default (128)
#NumpadMult::
Monitor.SetBrightness(128, 128, 128)
return
; Win + Numpad Div (/) -> Get Brightness
#NumpadDiv::
GetBrightness := Monitor.GetBrightness()
MsgBox % "Red:`t" GetBrightness.Red "`nGreen:`t" GetBrightness.Green "`nBlue:`t" GetBrightness.Blue
return
; INCLUDES ======================================================================================================================
#Include Class_Monitor.ahk
; ===============================================================================================================================
This class is great. I thank you. There is only one problem. When the low brightness is adjusted, the effect of the temperature decreases.jNizM wrote: ↑26 May 2015, 06:02Class Monitor
Set monitors brightness and color temperature
Source
Class_Monitor.ahk (GitHub)
Example
References
* GetDeviceGammaRamp
* SetDeviceGammaRamp
* How to Convert Temperature (K) to RGB
Contributing
- thanks to AutoHotkey Community
Questions / Bugs / Issues
Please report any bugs or issues here. Same for any questions.
Copyright and License
The Unlicense
OMFG YES!!! I have been putting off this update for ever, but I can no longer do that if I want other things to work on my PC. So, now I'm forced to choose between which products I want to work or not based on this stupid MicorSoft update....
PipeDreams wrote: ↑06 Mar 2020, 02:33OMFG YES!!! I have been putting off this update for ever, but I can no longer do that if I want other things to work on my PC. So, now I'm forced to choose between which products I want to work or not based on this stupid MicorSoft update....
I can't figure out if it is just a setting that got changed in the update or if AHK it self just needs to be updated to compensate for this MS update. I mean, I've made zero changes to this script, all I know is that it worked just fine before the update, and every time I uninstall the update it works again...
For now I have resorted to dimming a semi-transparent black borderless window over my screen... and I hate it, because it causes other issues with scripts that use pixel search/find.
windows 10 version 1909... AutoHotkey_1.1.32.00... Anyone know what is going on here?
It must be working. My work also uses this class and it works.
Your error message shows HTML code, not AHK code.
First steps to the new class are done. Brightness, Contrast, Degauss and Resetting works so far. Changing "Color Temperature" and "RGB Settings" are not compatible with my monitor (can not test it), but will also be integrated.You can use the monitor configuration functions to get information from a monitor and to change a monitor's settings. You can use these functions to :
- Change a monitor's geometry settings, such as the width and height of the display.
- Change image settings, such as brightness and contrast.
- Reset a monitor's settings to their factory defaults.
- Degauss the monitor.
Internally, the monitor configuration functions use the Display Data Channel Command Interface (DDC/CI) to send commands to the monitor.
I hope I can replicate Windows 10's Night Mode with your new class. With your old one I'm not able to decrease the blue all the way down.jNizM wrote: ↑26 Jun 2020, 06:23First steps to the new class are done. Brightness, Contrast, Degauss and Resetting works so far. Changing "Color Temperature" and "RGB Settings" are not compatible with my monitor (can not test it), but will also be integrated.
Edit
Found a way to get GetDeviceGammaRamp and SetDeviceGammaRamp working again under Win 2004
Wonderful news. I'm looking forward to the new class.jNizM wrote: ↑26 Jun 2020, 06:23Since GetDeviceGammaRamp and SetDeviceGammaRamp (limitations see msdn docu) are still not working for me since 1903 I'm working on the "Monitor Configuration API" from MSDNFirst steps to the new class are done. Brightness, Contrast, Degauss and Resetting works so far. Changing "Color Temperature" and "RGB Settings" are not compatible with my monitor (can not test it), but will also be integrated.You can use the monitor configuration functions to get information from a monitor and to change a monitor's settings. You can use these functions to :
- Change a monitor's geometry settings, such as the width and height of the display.
- Change image settings, such as brightness and contrast.
- Reset a monitor's settings to their factory defaults.
- Degauss the monitor.
Internally, the monitor configuration functions use the Display Data Channel Command Interface (DDC/CI) to send commands to the monitor.
Edit
Found a way to get GetDeviceGammaRamp and SetDeviceGammaRamp working again under Win 2004
Return to “Scripts and Functions (v1)”
Users browsing this forum: No registered users and 55 guests