AutoHotkey & NVIDIA (NvAPI)

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
lmstearn
Posts: 688
Joined: 11 Aug 2016, 02:32
Contact:

Re: AutoHotkey & NVIDIA (NvAPI)

06 Nov 2016, 23:49

@jNizM: Thanks very much for this.
Just been looking at the possibility of using NvAPI_SetViewEx to change scaling constants because of an issue here.
It's probably a subset NvAPI_DISP_SetDisplayConfig used for the same purpose in this example.
Interested? Or instead should I just try DLLCall to the address of NvAPI_SetViewEx: 06B89E6.
:arrow: itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
Casi

Re: AutoHotkey & NVIDIA (NvAPI)

05 Jun 2017, 04:11

Hello, and BIG thanks for the nice Script:

We have a little Problem. One could change the condition so that when a program starts in the full-screen mode which is then the script is reloaded?
Whenever a game or program changes to full screen mode? Is this possible?

Thank you for replies.

:D



; GLOBAL SETTINGS ================================================================================ ===============================

;#Warn
#NoEnv
#SingleInstance Force
SetBatchLines -1
#Include Class_NvAPI.ahk

; SCRIPT ================================================================================ ========================================

OnExit, EOF
NVIDIA := new NvAPI()

def := NVIDIA.GetDVCInfoEx(0).defaultLevel


; Win + Numpad 4 (or Numpad Left) ==> Decrease Digital Vibrance by 1
#Numpad4:: NVIDIA.SetDVCLevelEx((DV := NVIDIA.GetDVCInfoEx(0).currentLevel - 1) > 100 ? 100 : DV < 0 ? 0 : DV, 0)
#NumpadLeft:: NVIDIA.SetDVCLevelEx((DV := NVIDIA.GetDVCInfoEx(0).currentLevel - 1) > 100 ? 100 : DV < 0 ? 0 : DV, 0)


; Win + Numpad 5 (or Numpad Clear) ==> Set Digital Vibrance to Default (50)
#Numpad5:: NVIDIA.SetDVCLevelEx(def, 0)
#NumpadClear:: NVIDIA.SetDVCLevelEx(def, 0)


; Win + Numpad 6 (or Numpad Right) ==> Increase Digital Vibrance by 1
#Numpad6:: NVIDIA.SetDVCLevelEx((DV := NVIDIA.GetDVCInfoEx(0).currentLevel + 1) > 100 ? 100 : DV < 0 ? 0 : DV, 0)
#NumpadRight:: NVIDIA.SetDVCLevelEx((DV := NVIDIA.GetDVCInfoEx(0).currentLevel + 1) > 100 ? 100 : DV < 0 ? 0 : DV, 0)


; Win + Numpad 8 (or Numpad UpArrow) ==> Set Digital Vibrance to 80
#Numpad8:: NVIDIA.SetDVCLevelEx(80, 0)
#NumpadUp:: NVIDIA.SetDVCLevelEx(80, 0)


; EXIT ================================================================================ ==========================================

GuiClose:
EOF:
NVIDIA.SetDVCLevelEx(def, 0)
NVIDIA.OnExit()
ExitApp
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: AutoHotkey & NVIDIA (NvAPI)

05 Jun 2017, 14:47

Casi wrote:We have a little Problem. One could change the condition so that when a program starts in the full-screen mode which is then the script is reloaded?
You could check out Power Play:
https://autohotkey.com/boards/viewtopic ... 19&t=30007
Killerko
Posts: 1
Joined: 31 May 2017, 15:38

Re: AutoHotkey & NVIDIA (NvAPI)

08 Jul 2017, 22:46

Hi, is there a way how to get a power consumption from the gpu using this script? Like 80% tdp or 100% tdp or 120% tdp etc..
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: AutoHotkey & NVIDIA (NvAPI)

09 Jul 2017, 05:12

Killerko wrote:Hi, is there a way how to get a power consumption from the gpu using this script? Like 80% tdp or 100% tdp or 120% tdp etc..
Doesn't seem like it. You could get a rough estimate by getting the load though I would assume.
Patagonier
Posts: 2
Joined: 05 Aug 2017, 07:47

Re: AutoHotkey & NVIDIA (NvAPI)

05 Aug 2017, 08:19

Anybody found a solution for lmstearn's need to change the scaling settings? Want to do the same thing, but dunno how.
cch

Re: AutoHotkey & NVIDIA (NvAPI)

28 Nov 2017, 18:38

Hello.
Is there anyway to get current power of the card %, known as "power, %" in afterburner ?

Thank you
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: AutoHotkey & NVIDIA (NvAPI)

29 Nov 2017, 04:12

Did you test the Classic GUI (Clocks, Load, Fans & Temperature)?
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
blueeyiz702
Posts: 20
Joined: 12 Dec 2017, 20:12
Location: Las Vegas, Nevada
Contact:

Re: AutoHotkey & NVIDIA (NvAPI)

26 Dec 2017, 15:18

whoa,that's nice as hell. made my asusrog laptop colors just jump off screen.
pplatinumss
Posts: 7
Joined: 08 Apr 2019, 16:40

Re: AutoHotkey & NVIDIA (NvAPI)

24 Apr 2019, 13:46

can this be tweaked to control Brightness COntrast & Gamma?
sierratango
Posts: 2
Joined: 15 Jan 2016, 17:03

Re: AutoHotkey & NVIDIA (NvAPI)

06 May 2019, 13:41

I would also love to see brightness and contrast added, but I am not sure if it is possible if the appropriate APIs are not under the public NVIDIA SDK version.
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: AutoHotkey & NVIDIA (NvAPI)

29 Sep 2021, 02:07

AHK v2 moved here -> viewtopic.php?f=83&t=95112
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
dostroll
Posts: 40
Joined: 03 Nov 2021, 08:56

Re: AutoHotkey & NVIDIA (NvAPI)

29 Nov 2021, 00:10

Thanks for the great library!
I switched immediately from LibreHardwareMonitor.
Is there a sample that displays the values in a progress bar?

and there any plans to support power parameters?

(LEFT:AutoHotkey & NVIDIA (NvAPI) Right:LibreHardwareMonitor)
Image
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: AutoHotkey & NVIDIA (NvAPI)

29 Nov 2021, 03:34

Can you try the nvidia nvml lib if power usage is sopported for your gpu? There is also an example with progress bars.
viewtopic.php?p=423068#p423068
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
nvidianes2
Posts: 11
Joined: 21 Feb 2022, 05:27

Re: AutoHotkey & NVIDIA (NvAPI)

21 Feb 2022, 05:59

Hello jNizM, thank you for creating this thread and posting your code. I joined this forum just because of this topic that you have created. I always wanted to create different color profiles for Nvidia like the way my old Nvidia control panel used to allow me to do, but with my current card this is not possible. I have tried over and over again to change the Hue with an autohotkey script, but have been unsuccessful. I have a pretty old card, which is nvidia geforce GT 525m, but I believe it still uses the same Nvidia control panel that is available with modern cards. I also have windows 7 and Autohotkey version 1.1.24.1. I have even tried copying and pasting your Digital Vibrance script into a newly created script called "Class_NvAPI.ahk" but have had no success. I would appreciate if you could help me generate a script that would allow me to change the hue levels to specific numbers and also the digital vibrance because I am really lost. I have created small autohotkey scripts in the past, but nothing this great. I don't know if I need another piece of software, because you show a .png that looks unfamiliar to me, and cant see it in the nvidia control panel. I hope you are able to see this as for your last post in this thread was 2021. Thank you for taking the time to read this.
nvidianes2
Posts: 11
Joined: 21 Feb 2022, 05:27

Re: AutoHotkey & NVIDIA (NvAPI)

21 Feb 2022, 07:13

jNizM wrote:
08 Dec 2014, 09:49

* DRS_LoadSettings()
* DRS_LoadSettingsFromFile()
* DRS_SaveSettings()
* DRS_SaveSettingsToFile()
I also am wondering, do these save and load settings apply to the "Adjust Desktop Color Settings" ? If so that would be optimal, and actually mean I can save/load different color profiles, with different gamma, contrast, brightness, Digital Vibrance, and Hue. That would be great.
pplatinumss
Posts: 7
Joined: 08 Apr 2019, 16:40

Re: AutoHotkey & NVIDIA (NvAPI)

28 Jul 2022, 16:18

@nvidianes2 can save/load different color profiles, with different gamma, contrast, brightness, Digital Vibrance, and Hue. That would be great.

This would be great! I wonder if its possible?

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 101 guests