Quick-switch between Extended Desktop and Surround?

Firstly, thanks for going above and beyond to get this thing to help us work around what is essentially the most obvious feature that nVidia should have out of the box.

Secondly, seems like all of their recent drivers have changed it so that turning off Surround simply forces it to only enable your primary display (rather than all three). I've gone all the way back to a very old version of your script and an outdated set of drivers just to get this feature working again.

I'll keep an eye on this thread to see if there are any updates to this issue, in case I ever NEED a newer version of their drivers.
 
First of all im a complete newb when it comes to compiling scripts and whatnot so please excuse me..

I tried to make my own edit of the code then compile it into an exe however i just get some error messages in command prompt
fW32i96


The reason for my edit was that i still get the "timed out while waiting for the nvidia control panel" message, usually the 403 or 502 one, even after using v10 test 2
 
The reason for my edit was that i still get the "timed out while waiting for the nvidia control panel" message, usually the 403 or 502 one, even after using v10 test 2
That's unusual... If it's purely a timing issue, that would mean that the Nvidia Control Panel is taking longer than 15 seconds to open on your Surround-capable gaming PC. That doesn't sound right at all.

Sounds more like the control panel is crashing or not-starting on your machine. I can't replicate this behavior, even with the latest Nvidia drivers, so I can't really test it or fix it...
 
Firstly, thanks for going above and beyond to get this thing to help us work around what is essentially the most obvious feature that nVidia should have out of the box.

Secondly, seems like all of their recent drivers have changed it so that turning off Surround simply forces it to only enable your primary display (rather than all three). I've gone all the way back to a very old version of your script and an outdated set of drivers just to get this feature working again.

I'll keep an eye on this thread to see if there are any updates to this issue, in case I ever NEED a newer version of their drivers.

I am also having this exact issue.

Worked perfectly before. Absolutely great utility though I have to say.

Thanks.
 
That's unusual... If it's purely a timing issue, that would mean that the Nvidia Control Panel is taking longer than 15 seconds to open on your Surround-capable gaming PC. That doesn't sound right at all.

Sounds more like the control panel is crashing or not-starting on your machine. I can't replicate this behavior, even with the latest Nvidia drivers, so I can't really test it or fix it...

So i tried to get the whole thing on video, didnt work so well so heres what happened,
did a few switches back and forth,
it started with error code 601 a few times so i had to manually set it to surround,
when i then used the surround toggle to turn surround off it went back to 1 display for about 2 or 3 tries so had to set it to expanded manually,
and after all that it seems to be working for about 1-2 switches then it bugs out leaving me with 1 screen when going to back from surround..

2 things to note.
My audio stays muted after both types of switches.
In the past when i have had the other error messages, the "applying changes" window have appear.

I hope this wasnt too confusing of an explanation, English isnt my first language so grammar might be off..
 
Do these issues persist even if you run the last stable build (version 8) from the first post in this thread?

I honestly can't replicate the behavior you're seeing on my system. Latest driver, it switches perfectly every single time... At this point, all I can really do is guess why it's not working for you.
 
Last edited:
Do these issues persist even if you run the last stable build (version 8) from the first post in this thread?

I honestly can't replicate the behavior you're seeing on my system. Latest driver, it switches perfectly every single time... At this point, all I can really do is guess why it's not working for you.

After some testing (v3, v4 beta2, v5, v6, v7, v8) i found that v3 is by far the fastest one and seemingly without error codes, however its unreliable when going back to extended, some times it just leaves me with one screen and some times it works as intended

Some of the others had a strange issue, some of the times they would switch out of surround and just before the screens came back, switch back to surround
 
After some testing (v3, v4 beta2, v5, v6, v7, v8) i found that v3 is by far the fastest one and seemingly without error codes, however its unreliable when going back to extended, some times it just leaves me with one screen and some times it works as intended
Wait, you're on Windows 7?

Versions 3 and earlier are for Windows 7 with older drivers. Version 4 and later are for Windows 8.1 with newer drivers. I'm not supporting this script on Windows 7 anymore, I don't have the resources to test it adequately.
 
Official release of version 9 https://db.tt/hdFHaiud

Changelog:
- Fix for windows sometimes maximizing behind the taskbar while in Surround mode (cfg file option, off by default).
- Splash window can now be displayed during script execution. (cfg file option, on by default)
- Fewer pop-ups during the switching process. Windows that cannot be moved off-screen are made transparent while the script executes.
- Increased time-out values to prevent time-out errors on slower computers.
- Source, changelog, and program icon are included in a ZIP file with the compiled script.

Source:
Code:
;==============================================================================================
; 0 Set Defaults
;==============================================================================================
#NoTrayIcon
#SingleInstance ignore

INISection1 = NVSToggleInternal
AppVersionStatic = 9
CfgVersionStatic = 9

INISection2 = UserOptionsSurround
BezelCorrectionStatic = 128
SwapScreensStatic = 0
OrientationStatic = 0
TaskbarFixStatic = 0

INISection3 = UserOptionsExtended
AccessoryDisplayStatic = 0

INISection4 = GlobalOptions
ShowStatusWindowStatic = 1


;==============================================================================================
; 1 Write new configuration file
;==============================================================================================
IniRead, CfgVersionVar, %programdata%\NVSToggle\NVSToggle.ini, %INISection1%, CfgVersion
	IF CfgVersionVar != %CfgVersionStatic%
	{
		FileRemoveDir, %programdata%\NVSToggle\, 1
		FileRemoveDir, %appdata%\NVSToggle\, 1
		FileCreateDir, %programdata%\NVSToggle
		
		IniWrite, %AppVersionStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection1%, AppVersion
		IniWrite, %CfgVersionStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection1%, CfgVersion
		IniWrite, %BezelCorrectionStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, BezelCorrection
		IniWrite, %SwapScreensStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, SwapScreens
		IniWrite, %OrientationStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, Orientation
		IniWrite, %TaskbarFixStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, TaskbarFix
		IniWrite, %AccessoryDisplayStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection3%, AccessoryDisplay
		IniWrite, %ShowStatusWindowStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection4%, ShowStatusWindow
		
		MsgNewCFG()
	}


;==============================================================================================
; 2 Read configuration file
;==============================================================================================
IniRead, AppVersionVar, %programdata%\NVSToggle\NVSToggle.ini, %INISection1%, AppVersion
	IF (AppVersionVar < AppVersionStatic)
		IniWrite, %AppVersionStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection1%, AppVersion

IniRead, BezelCorrectionVar, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, BezelCorrection
	IF (BezelCorrectionVar < 0) or (BezelCorrectionVar > 1024){
		IniWrite, %BezelCorrectionStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, BezelCorrection
		BezelCorrectionVar = %BezelCorrectionStatic%
	}
IniRead, SwapScreenVar, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, SwapScreens
	IF (SwapScreenVar < 0) or (SwapScreenVar > 3){
		IniWrite, %SwapScreensStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, SwapScreens
		SwapScreenVar = %SwapScreensStatic%
	}
IniRead, OrientationVar, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, Orientation
	IF (OrientationVar < 0) or (OrientationVar > 3){
		IniWrite, %OrientationStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, Orientation
		OrientationVar = %OrientationStatic%
	}
IniRead, TaskbarFixVar, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, TaskbarFix
	IF (TaskbarFixVar < 0) or (TaskbarFixVar > 1){
		IniWrite, %TaskbarFixStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection2%, TaskbarFix
		TaskbarFixVar = %TaskbarFixStatic%
	}
IniRead, AccessoryDisplayVar, %programdata%\NVSToggle\NVSToggle.ini, %INISection3%, AccessoryDisplay
	IF (AccessoryDisplayVar < 0) or (AccessoryDisplayVar > 1){
		IniWrite, %AccessoryDisplayStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection3%, AccessoryDisplay
		AccessoryDisplayVar = %AccessoryDisplayStatic%
	}
IniRead, ShowStatusWindowVar, %programdata%\NVSToggle\NVSToggle.ini, %INISection4%, ShowStatusWindow
	IF (ShowStatusWindowVar < 0) or (ShowStatusWIndowVar > 1){
		IniWrite, %ShowStatusWindowStatic%, %programdata%\NVSToggle\NVSToggle.ini, %INISection4%, ShowStatusWindow
		ShowStatusWindowVar = %ShowStatusWindowStatic%
	}
		
;==============================================================================================
; 3 Determine current display state
;==============================================================================================
IF (OrientationVar = 1) or (OrientationVar = 3)
	AspectRatioVar = 0.8
Else
	AspectRatioVar = 3.6

IF (AspectRatioVar < A_ScreenWidth/A_ScreenHeight)
{
	ToggleVar = ToggleOff
	IfEqual, ShowStatusWindowVar, 1
		MsgSplash("extended")
}

IF (AspectRatioVar >= A_ScreenWidth/A_ScreenHeight)
{
	ToggleVar = ToggleOn
	IfEqual, ShowStatusWindowVar, 1
		MsgSplash("surround")
}

;==============================================================================================
; 4 Open NVIDIA Control Panel off screen
;==============================================================================================
Runwait, taskkill /im nvcplui.exe /f, , Hide		; Make sure the NVCPL isn't  already open before proceeding
Loop{
	Run "C:\Program Files\NVIDIA Corporation\Control Panel Client\nvcplui.exe"
	WinWait, NVIDIA Control Panel, , 15
		IF ErrorLevel
			MsgTime("401")
			
		WinSet, Transparent, 1
		CenterWindow(NVIDIA Control Panel)
		WinActivate

	Loop{
		IfWinExist, , Span &displays with Surround
		{
			Sleep 1000
			ControlClick, Button4			; Span displays with surround checkbox
			Sleep 500
			ControlClick, Button7			; Apply button
			Goto, %ToggleVar%
		}

		IfWinExist, , Set PhysX Configuration	; The presence of this menu item indicates Surround is not supported
			MsgCompat()

		Sleep 100
		IF a_index > 20					; Assume control panel has loaded and the page needs to be switched
		{
			ControlClick, Static3				; Configure Surround link
			Sleep 1000
			Runwait, taskkill /im nvcplui.exe /f, , Hide
			Sleep 500
			Break
		}
	}
	
	IF a_index > 3
		MsgTime("402")
}

MsgError("403")

;==============================================================================================
; 5 Toggle-off (switch to Extended Desktop mode)
;==============================================================================================
ToggleOff:
	Loop{
		IF (AspectRatioVar > A_ScreenWidth/A_ScreenHeight){
			Sleep 200
			Runwait %windir%\System32\DisplaySwitch.exe /extend
			
			IF (AccessoryDisplayVar = 1){
				Sleep 1000
				WinActivate, NVIDIA Control Panel				; Reactivate window
				Sleep 200
				ControlClick, Static10						; Set up multiple displays link
				Sleep 2000
				WinMove, , , 0, 0, 1024, 768					; Move window on-screen and set specific size
				Sleep 200
				MouseClick, Left, 339, 320, 1, 1				; Uncheck 4th Monitor
				Sleep 1000
				MouseClickDrag, Left, 426, 520, 621, 520, 1		; Swap positions of left and center screens
				Sleep 1000
				WinMove, -4096, -4096
				Sleep 200
				ControlClick, Button2						; Apply Button
				Sleep 2000
				Runwait, taskkill /im nvcplui.exe /f, , Hide
				Exit
			}
			Sleep 500
			Runwait, taskkill /im nvcplui.exe /f, , Hide
			Exit
		}
		
		Sleep 100
		IF a_index > 150
			MsgTime("501")
	}

MsgError("502")
	
;==============================================================================================
; 6 Toggle-on (switch to Surround mode)
;==============================================================================================
ToggleOn:
	WinWait, NVIDIA Set Up Surround, , 15
		IF ErrorLevel
			MsgTime("601")
		
		WinSet, Transparent, 1
		WinMove, 0, 0
		WinActivate
	
		IF (SwapScreenVar != 0){
			Sleep 200
			IF (SwapScreenVar = 1)
				MouseClickDrag, Left, 300, 200, 700, 200, 1
			IF (SwapScreenVar = 2)
				MouseClickDrag, Left, 300, 200, 520, 200, 1		
			IF (SwapScreenVar = 3)
				MouseClickDrag, Left, 550, 200, 330, 200, 1
			}
			
		IF (OrientationVar != 0){
			Sleep 200
			IF (OrientationVar = 1){
				MouseClick, Right, 330, 145, 1, 1
				MouseClick, Left, 343, 180, 1, 1
				}
			IF (OrientationVar = 2){
				MouseClick, Right, 330, 145, 1, 1
				MouseClick, Left, 343, 203, 1, 1
				}
			IF (OrientationVar = 3){
				MouseClick, Right, 330, 145, 1, 1
				MouseClick, Left, 343, 224, 1, 1
				}
		}
		
		Sleep 200
		ControlClick, Edit1									; Bezel Correction Value
		Send %BezelCorrectionVar%{Delete}{enter}

	Loop{
		IF (AspectRatioVar < A_ScreenWidth/A_ScreenHeight)
		{
			IfEqual, TaskbarFixVar, 1
			{
				WinClose, NVIDIA Set Up Surround
				MsgSplashGeneric("Applying window maximization fix...")	; Update splash window
				WinWaitClose
					
				WinActivate, NVIDIA Control Panel
				Sleep 500
				Loop, 2									; Fix for windows maximizing behind the taskbar
				{
					Sleep 200
					Send {Alt}
					Sleep 100
					Send k
					Sleep 100
					Send s
					Sleep 100
					Send c
				}
			}
			Sleep 200
			Runwait, taskkill /im nvcplui.exe /f, , Hide
			Exit
		}
		
		Sleep 50
		IF a_index > 160
			MsgTime("602")
	}

MsgError("603")

;==============================================================================================
; 7 Message Boxes and error windows
;==============================================================================================
MsgNewCFG(){
	MsgBox, 323, Nvidia Surround Toggle, A new config file has been created in the following location:`n"%programdata%\NVSToggle\NVSToggle.ini"`n`nWould you like to edit these settings now?
		IfMsgBox Cancel
			Exit
		IfMsgBox Yes
			RunWait %windir%\System32\Notepad.exe %programdata%\NVSToggle\NVSToggle.ini
	Return
}
	
MsgCompat(){
	Run, taskkill /im nvcplui.exe /f, , Hide
	SplashTextOff
	MsgBox, 64, Nvidia Surround Toggle, Attention: `nYour system is not NVIDIA Surround capable.
	Exit
}

MsgTime(ErrCode){
	Run, taskkill /im nvcplui.exe /f, , Hide
	SplashTextOff
	MsgBox, 16, Nvidia Surround Toggle, Error: `nTimed out while waiting for the NVIDIA Control Panel. (Code %ErrCode%)
	Exit
}

MsgError(ErrCode){
	Run, taskkill /im nvcplui.exe /f, , Hide
	SplashTextOff
	MsgBox, 16, Nvidia Surround Toggle, Error: `nExecution halted unexpectedly. (Code %ErrCode%)
	Exit
}

MsgSplash(ModeText){
	SplashTextOn, 320, 68, NVIDIA Surround Toggle, `nSwitching to %ModeText% mode...
	WinSet, AlwaysOnTop, On, NVIDIA Surround Toggle
}

MsgSplashGeneric(SimpleText){
	SplashTextOn, 320, 68, NVIDIA Surround Toggle, `n%SimpleText%
	WinSet, AlwaysOnTop, On, NVIDIA Surround Toggle
}

;==============================================================================================
; 8 Functions
;==============================================================================================
CenterWindow(WinTitle){
    WinGetPos,,, Width, Height, %WinTitle%
    WinMove, %WinTitle%,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
}


INI File (%programdata%\NVSToggle\NVSToggle.ini) definitions:
Code:
BezelCorrection=128
     The bezel correction value (in pixels).
     Valid settings for this option are 0 through 1024.

SwapScreens=0
     Re-order screens in Surround mode.
     0 = Nothing swapped
     1 = Swap left and right
     2 = Swap left and center
     3 = Swap right and center

Orientation=0
     Screen orientation in Surround mode.
     0 = Landscape
     1 = Portrait
     2 = Inverted landscape
     3 = Inverted portrait

TaskbarFix=0
     Fix for windows maximizing behind the taskbar in Surround mode
     0 = Fix Disabled (Default)
     1 = Fix Enabled

ShowStatusWindow=1
     Status window that displays current operation while the script runs
     0 = Status window disabled
     1 = Status window enabled (Default)

Original post has been updated with the latest version info, as well. :D
 
Wait, you're on Windows 7?

Versions 3 and earlier are for Windows 7 with older drivers. Version 4 and later are for Windows 8.1 with newer drivers. I'm not supporting this script on Windows 7 anymore, I don't have the resources to test it adequately.

Oh well that explains alot haha :p Guess ill stick to 3 then :) Great script and amazing work either way !!
 
Has anyone made this work on Windows 10? When I try it, I only get the timed out error (401).
 
Has anyone made this work on Windows 10? When I try it, I only get the timed out error (401).
I've upgraded to Windows 10, and the current script worked without modification...

I'll investigate when I get home. I'm in the middle of moving to a new place, so it might be a little while before I can update anything.
 
I've upgraded to Windows 10, and the current script worked without modification...

I'll investigate when I get home. I'm in the middle of moving to a new place, so it might be a little while before I can update anything.

Works sometimes, but the majority of time I get a timeout error.
 
Did you ever find a way to make this work with SLI?
I'd need an SLI system to test it on because the method for switching on SLI systems is a bit different than single-card.

I don't generally want SLI, personally, so I've never looked into getting a second card.

Walking through the process flow real quick...
1. The "NVIDIA Control Panel" window opened successfully in less than 15 seconds. (Explicit)
2. The string "Span Displays with Surround" was found within the window. (Explicit)
3. Wait 1000ms.. Click the "Span displays with surround" checkbox. (Assumed)
4. Wait 500ms.... Click the "Apply" button. (Assumed)
5. The "NVIDIA Set Up Surround" window did not appear in less than 15 seconds (Error 601)

So the problem is at step 3 or step 4 (which the script simply assumes have worked and continues onwards), or the expected window is taking an exceptionally long time to open.

Let me add some additional wait-time and upload a test version for ya'

Edit: Give this a try. I went ahead and made it wait longer before assuming the box / buttons have been clicked: https://db.tt/TyMW8f73
 
Last edited:
Sorry to bother you but I can't get this working on Windows 10.

I started off getting the 601 error but I managed to fix that, by upping the wait to 3000 and 1500 (for the "span displays with surround" and "apply"). Now I get to the bezel correction screen where it just hangs and brings up error 602. It works fine for me switching back to extended.

Any help would be greatly appreciated.
 
Sorry to bother you but I can't get this working on Windows 10.

I started off getting the 601 error but I managed to fix that, by upping the wait to 3000 and 1500 (for the "span displays with surround" and "apply"). Now I get to the bezel correction screen where it just hangs and brings up error 602. It works fine for me switching back to extended.

Any help would be greatly appreciated.
This isn't a Windows 10 issue. It sounds to me like your Nvidia Control Panel is taking exceptionally long to respond to inputs...anything you can do to speed-up your computer?
I just compiled NVSToggle v10 Pre3, which includes a large number of improvements, as well as user-configurable timings. Give this version a try and see if it helps you:

Download Link: https://db.tt/es7xayP1
Edit: I had to re-upload this due to a last-minute bugfix. If you already downloaded v10 Pre3, please re-download it from the above link.

Changelog:
- Optimized method for hiding windows, preventing windows from briefly flickering on-screen before being hidden.
- Fixed an issue that could result in the script not exiting cleanly under certain circumstances.
- Improved message-window handling.
- Setting "TimingMode" to "2" will enable slower timings and longer time-out periods.
- Setting "TimingMode" to "3" will enable EVEN SLOWER timings and EVEN LONGER time-out periods.
- If a timeout error occurs, the TimingMode value is automatically increased to help prevent future time-out errors.
 
Last edited:
It shouldn't be my hardware since I'm using a 3570k and an 850 Pro. I can only imagine I have a software issue somewhere, but this is a clean install without a whole lot on it.

New version works but it doesn't handle my 4th monitor properly (mounted above my 3). I have set the accessory display variable to 1 but it's treating it as a 1x4 setup.
When returning to extended everything is orientated fine but sometimes it will disable the 4th after a few seconds.
 
It shouldn't be my hardware since I'm using a 3570k and an 850 Pro. I can only imagine I have a software issue somewhere, but this is a clean install without a whole lot on it.
I've got a 2500k and an 850 Pro, but I never experience any of the timing issues that are often reported to me in this thread. I'm really not sure what could have gone wrong with the Nvidia Control Panel to make it respond so slowly on your system...

I used to maintain a special version with super-tight timings for myself, but I'm getting ready to merge those timings in as an option now that I've implemented the infrastructure for multiple timing modes. Should be in by the time v10 goes final, for systems that can handle it.

New version works but it doesn't handle my 4th monitor properly (mounted above my 3). I have set the accessory display variable to 1 but it's treating it as a 1x4 setup.
When returning to extended everything is orientated fine but sometimes it will disable the 4th after a few seconds.
I've never personally tested this script on a 4-monitor system, so I can't make any guarantees that it'll work correctly for you (Same goes for SLI support. I don't have 2 cards, so I can't test it...)

I'd still like to try and troubleshoot your issues, though. Lets start with switching TO surround mode... precisely what configuration do your monitors end up in after running NVSToggle? What configuration would you like them to be in, ideally?
 
I'd still like to try and troubleshoot your issues, though. Lets start with switching TO surround mode... precisely what configuration do your monitors end up in after running NVSToggle? What configuration would you like them to be in, ideally?

Ideal would be:
___[4] <- Accessory display
[1] [2] [3] <- Surround
___/\
Primary display

Right now it ends up:
[2] [3] [1] [4]
___/\
Primary display

Hopefully that's clear, let me know if it's not. Really appreciate the help but don't worry if there's no easy solution.
 
Last edited:
Well I just wrote a program based on the same idea as the OP, any one cares to check it out and report the problems back to me?
I expect lot of bugs, but for know I am sure that it wont work with SLI setups as it cant find the surround checkbox. Unfortunately I dont have a surround setup to debug it.
https://github.com/falahati/NVIDIASurroundToggler
 
Well I just wrote a program based on the same idea as the OP, any one cares to check it out and report the problems back to me?
I expect lot of bugs, but for know I am sure that it wont work with SLI setups as it cant find the surround checkbox. Unfortunately I dont have a surround setup to debug it.
https://github.com/falahati/NVIDIASurroundToggler
Honest question... what does this do that my utility dosn't?

You might also consider making your own icon so that our two utilities aren't so easily confused. You're literally using the same name (+2 letters) and icon right now...

What info would you need from an SLI system?
For starters, all of the "visible window text" information from AutoIt Window Spy for the main Nvidia Control Panel window, as well as the ClassNN ID's for the checkboxes and buttons needed to enable Surround mode.
 
Last edited:
I'm back! I just finished installing Windows 10, specifically to use your newest version (10 pre 3) for toggling with drivers made in the last year.

Unfortunately I was getting a 602 error when going from Extended to Surround. Surround to Extended works perfectly if I set up Surround manually.

What I've done to trouble shoot the problem is commented out the line:
Code:
;WinSet, Transparent, 1

So I can see where in the GUI it is failing. Apparently the script doesn't do anything to select Topology setting options... it just assumes you have your Topology ready to go and all of your monitors selected. I don't know if this is something special in the newest nVidia drivers or something wacky with how I have things set up, but every time I've come to the NVIDIA Set Up Surround screen, everything under Displays shows a default of 1 x 2 and no displays checked in the Display list. I have to do that manually.

So I added this bit of code to explicitly do just that, which not only picks Topology of 1 x 3, but also selects the displays in my personal left to right order of 3, 1, 2 (so I don't even need the swap functionality put in there originally).

Code:
ToggleOn:
	WinWait, NVIDIA Set Up Surround, , 15
		IF ErrorLevel
			MsgTime("601")
		
		WinSet, Transparent, 1
		WinMove, 0, 0
		WinActivate

		ControlClick, ComboBox1
		Sleep 50
		Send {home}{down}{enter}
		Sleep 50
		ControlClick, x65 y565
		ControlClick, x65 y527
		ControlClick, x65 y553
	
...snip...

There's probably a better way to do this, but this is the first time I've used ControlClicks for anything in AHK and that's the best I could do from what Window Spy was showing me (that I could tell). Maybe someone else could use this snippet, or any gurus in here could offer a more elegant workaround for 602 errors?
 
Registered here to thank Unknown-One.

THANK YOU!!!!!!!

I simrace on iracing in surround and do everything else in extended desktop and switching back and forth all the time was a huge pain.

I had some trouble at first and couldn't figure it out. The script kept timing out and I have had issues with the hot key combo not working since I switched to windows 10. Turns out it was EVGA precision X not allowing it to work. I uninstalled precision x and replaced it with Afterburner and all is good.
 
I registered here just to thank Unknown-One. Awesome work you've done. I was about ready to give up on using surround, and I had just spent quite a lot to get it set up. Granted, I only justified the purchase of these displays for productivity, but I really did want to run some games on them! Your solution solves the problem, as now I can just hit a button on my quick launch bar and switch back and forth between surround and extended.

On a side note, you should know that the Nvidia Control Panel is highly volatile and sometimes takes 20-30 seconds to open even for people with blazing fast PC's.

For me, it never takes less than 15 seconds, but usually not more than 25 either. So I set the timeout value in the AutoHotKey script to 25, and it's much more reliable now.

For reference, I'm running a 4770k OC'd to 4.4Ghz, and a 980ti. However, I'm also running 7680x1440 surround, rather than 5760x1080. It may be that that causes the control panel to take much longer to launch. Still, whatever the reason, the control panel is much slower for me than it is for you, despite having great hardware and a fresh installation of W10.
 
Came back on here to redownload the toggle after upgrading my PC. Sadly links aren't working (dropbox can't find the file).. Is there still a working version? :(
 
Whoops, looks like we might have exceeded the download limit on Dropbox

I'll re-upload the files when I get home from work tonight. Sorry about that guys!
 
Hey Unknown-One, any update on the re-upload? Looking for v10 with the extended timeout functionality. Thanks!
 
Hey Unknown-One, any update on the re-upload? Looking for v10 with the extended timeout functionality. Thanks!
Check the OP, I just put some finishing touches on version 10. Download away!

Let me know if you run into any issues :)
 
Apparently the script doesn't do anything to select Topology setting options... it just assumes you have your Topology ready to go and all of your monitors selected
That's correct, I don't mess with the "topology" dropdown at all...

I'll update to the latest drivers and see if the issue crops-up for me as well. Either way, I'll try to get that fixed for you!
 
Unknown-One, I'm trying to download v10 of your app and Dropbox is saying that your account is disabled due to too much traffic. Is there a way this could be fixed? v9 stopped working reliably for me as reverting to multi-monitor from Surround fails to activate my second display and I'm hoping v10 fixes this.
 
Looks like so many people downloaded it so quickly, all downloads from my account have been suspended for the next 24 to 72 hours. Nothing I can do about it, we just have to wait it out.

Just so you know that means you guys pulled MORE THAN 100,000 downloads, in a single day, from my dropbox account.

I guess that proves how in-demand this feature is. Still baffles me why Nvidia wont implement it...

Edit: Mirrored on MediaFire: Nvidia Surround Toggle v10.zip
 
Last edited:
Check the OP, I just put some finishing touches on version 10. Download away!

Let me know if you run into any issues :)

Hey Unknown-One, I downloaded the latest v10 and everything is working much smoother.

This script is awesome, thanks!
 
Looks like so many people downloaded it so quickly, all downloads from my account have been suspended for the next 24 to 72 hours. Nothing I can do about it, we just have to wait it out.

Just so you know that means you guys pulled MORE THAN 100,000 downloads, in a single day, from my dropbox account.

I guess that proves how in-demand this feature is. Still baffles me why Nvidia wont implement it...

Edit: Mirrored on MediaFire: Nvidia Surround Toggle v10.zip


Wow, that is insane! and a testament to your continued development of this much needed application! Thank you again for the hard work you have put into this. Really will never understand why Nvidia wont add this feature...
 
I can't quiet get this to work like I use to be able to. So I've tried all the screen swaps and I can not get the non-surround to be layed out correctly. So in surround my numbers go (from left to right) 2 3 1, but when i try to switch to non-surround it still shows 2 3 1 but it acts like my middle monitor should be on the left. So it would read more like 3 1 2. Any ideas? - Edit - I used swap screen 0 in settings
 
Edit - I used swap screen 0 in settings
So using 0 (don't swap anything) fixed it for you, or are you still having issues?

You might have to physically change which port each monitor is plugged into if you're having weird issues getting the displays in the correct order, though generally one of the SwapScreen values will work for everyone.
 
Back
Top