Script to change display refresh rate


  1. Posts : 19
    Windows 10 Pro X64
       #1

    Script to change display refresh rate


    Hi there,

    I'd like to know if someone knows a script or tool that I can use to automatically change the refresh rate in windows display settings to 75Hz when a specific program launches and then when that program closes it reverts to 60Hz

    Kind regards
      My Computer


  2. Posts : 1,774
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #2

    Have a look at NirCMD's setdisplay command. I haven't used setdisplay but it has a refresh rate optional parameter that looks like it will do what you want.

    One of the examples shows: setdisplay 1024 768 24 90
    i.e. 1024 x 768 24-bit colour 90Hz refresh rate

    As for scripting, NirCMD commands can be called from a .BAT file or wrapped in AutoHotkey/AutoIt.

    Hope this helps...
      My Computer


  3. Posts : 43,022
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #3

    As @RickC says, Autohotkey lends itself to this- you could simply have a loop running and test for the presence or absence of the process, and launch nircmd accordingly. More simply you could launch the program and nircmd in the script, then have a loop test for the closure of the program and then launch nircmd to change the resolution back.

    If unfamiliar with Autohotkey it has an extensive help file and a good support forum.

    It's easy to write 1,2 or 3 line scripts to test elements of what you need.
      My Computers


 

  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 15:05.
Find Us




Windows 10 Forums