Cycle nvidia display outputs using command line and autohotkey

Saturday, March 15, 2008

Cycle nvidia display outputs using command line and autohotkey

New nvidia graphic cards usually come with a tv output, a vga output and a dvi output. You can use those outputs at the same time or you can switch between them. I prefer the latter. Going to the control panel all the time to switch displays was a pain in the ass. So I made this autohotkey script to cycle between my TV, my Monitor and my Projector using Ctrl-F2:

currentMode = 0
^F2:: ;Ctrl-F2
if (currentMode = 0) {
run rundll32.exe NvCpl.dll`,dtcfg setview 0 standard TA,,Hide ;TV
currentMode = 1
} else if (currentMode = 1) {
run rundll32.exe NvCpl.dll`,dtcfg setview 0 standard DA,,Hide ;DVI
currentMode = 2
} else if (currentMode = 2) {
run rundll32.exe NvCpl.dll`,dtcfg setview 0 standard AA,,Hide ;VGA
currentMode = 0
}
return

3 comments:

Anonymous said...

This is great, just what I was looking for! Many thanks!

Anonymous said...

I've been looking all over for something similar to this. Would you know how to modify this script so that I can switch Dual-Views like this...

Setup #1 = Primary Monitor + Secondary Monitor

Setup #2 = Primary Monitor + TV

I agree that going to the control panel so often is a pain. I just KNOW there must be a Hotkey way!

Thanks a lot!

Anonymous said...

works great for my 9600GT + CRT monitor + LCD HDTV setup. Thanks!

Post a Comment