[Guide] How to auto-adjust brightness when running on battery/charging

  1. Posts : 28
    Windows 10

    [Guide] How to auto-adjust brightness when running on battery/charging

    Hey guys,

    Windows 10 removed the option to set one brightness level for running a laptop on AC, and another for running on battery (forcing you to either have one constant battery level, or change it manually - there was no way in the system you could change this).

    A kind user over at the Autohotkey forums helped me find an answer.

    First, head over to AutoHotkey and install the program (32 bit or 64 bit, depending on your Windows 10 install).

    Then, head on over to this thread, check out VSUB's post, and click 'Download' above the script they've posted.

    You can change brightness on charge and brightness on battery by changing the values of the script that are bolded below:

    SendMessage,0x0422,0,50, msctls_trackbar321
    IniWrite,Off,% A_ScriptDir"\Power.ini",Status,Battery
    SendMessage,0x0422,0,10, msctls_trackbar321
    IniWrite,On,% A_ScriptDir"\Power.ini",Status,Battery

    I've got my AC/charging brightness set at 90% (the first value, 50), and my on-battery value set to 50% (the second value, 10).

    To edit an Autohotkey script (.ahk), right click the script, click 'Open with...', select notepad, edit those values, then save the script as an .ahk again.

    As vsub says, make sure that you're plugged in the first time you run the task. You can add it to your start menu Startup folder or schedule it to start when Windows starts as per other tutorials.

    I know a lot of us were frustrated by this, so for those googling:

    Windows 10 change brightness on battery
    Windows 10 how to change brightness on AC
    Windows 10 Power Plan Brightness Charging and Battery
      My Computer

  2. Brink's Avatar
    Posts : 56,224
    64-bit Windows 10 Pro for Workstations build 21354

    If you like, you can also use the command in option 4 or 5 in the tutorial below to change the display brightness if it may be easier for you to use, and create shortcuts using the command.

    Adjust Screen Brightness in Windows 10
      My Computers

  3. Posts : 1,141
    Windows 10


    AutoHotkey is a very powerful program I used to be friends with until now almost all antivirus tend to falsely identify its compiled executables as viruses since they found out it can be used easily to create viruses due to its limitless capabilities and ease of use .

    So you did well by providing the method so users can do it home made as sharing end result executable may raise a lot of alerts and suspicions by users unaware of such fact .
      My Computer

  4. Posts : 28
    Windows 10
    Thread Starter

    Yep, I think everybody should be able to install the program and then see that the code of this script is very innocuous - plus, if I can teach myself how to use AHK (with the very patient and helpful forum members), anyone can! :)

    I've never compiled my scripts into .exes or downloaded compiled .exes for the same reason you mentioned - easier and more educational to write your own scripts, or at least understand how they work when you run them.
      My Computer


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 07:43.
Find Us

Windows 10 Forums