2

Windows 10 has a way to customize your display settings with the physical order of your multiple monitors, in the pictures below you will see what I mean if you don't know already. I want to use a batch file or another program to toggle between the two monitor orders below. I've looked around and been unable to find any information on this. I want the batch file/program to toggle between these two settings:

Monitor order left to right 2-1-3

Monitor order left to right 3-2-1

If you have found any programs that are able to accomplish this at the click of a button, please link me.

context: I play a game called Counter-Strike: Global Offensive (CSGO). I run the game at a resolution of 1280x1024 stretched on a 1920x1080 monitor that is on the left side of my 3 monitor setup. Running a game in a lower resolution than what I usually run the monitor at causes the windows on the other monitors to displace in compensation for the lost real-estate. The only fix there seems to be for this phenomenon is to have the game monitor on the right side of the setup, and I can't move it there physically. This means that the way my mouse moves across monitors is not physically correct and I want it to be correct.

This image explains it better than that ^

rookr
  • 41

2 Answers2

2

Ended up figuring it out thanks to Curtis. I used Display Changer to get the displays to, well, change. The batch files call

I wrote a python script that makes two batch files, and decides which to run based on the number in state.txt.

    #matthew blaire
    #6/29/2016
    import os
    from subprocess import call

    userpath = os.path.expanduser("~/Documents")
    filepath = userpath + "/csgo monitor changer"
    normalpath = filepath + "/normal.bat"
    statepath = filepath + "/state.txt"
    csgopath = filepath + "/csgo.bat"
    try:
            ProgramFilesPath = os.path.expandvars("%PROGRAMFILES(X86)%")
    except:
            ProgramFilesPath = os.path.expandvars("%PROGRAMFILES%")
    ProgramFilesPath = ProgramFilesPath + "\\12noon Display Changer\\dc64cmd.exe\""

    if not os.path.exists(filepath): #checks if the filepath exists
            os.makedirs(filepath) #makes it if it doesn't exist already, also makes the files below if they don't already exist

            state = open(statepath, "w")
            state.write("0")
            state.close()

            csgo = open(csgopath, "w")
            csgo.write("\"" + ProgramFilesPath + " -monitor=\"\\\\.\\DISPLAY3\" -more -lx=-1920\n")
            csgo.write("\"" + ProgramFilesPath + " -monitor=\"\\\\.\\DISPLAY2\" -apply -lx=-3840\n")
            csgo.close()

            normal = open(normalpath, "w")
            normal.write("\"" + ProgramFilesPath + " -monitor=\"\\\\.\\DISPLAY2\" -more -lx=1920\n")
            normal.write("\"" + ProgramFilesPath + " -monitor=\"\\\\.\\DISPLAY3\" -apply -lx=3840\n")
            normal.close()

    state = open(statepath, "r")
    if state.read() == "0":
            state.close()
            state = open(statepath, "w")
            call(normalpath)
            state.write("1")

    else:
            state.close()
            state = open(statepath, "w")
            call(csgopath)
            state.write("0")
    state.close()

The batch scripts:

csgo.bat:

"C:\Program Files (x86)\12noon Display Changer\dc64cmd.exe" -monitor="\\.\DISPLAY3" -more -lx=-1920
"C:\Program Files (x86)\12noon Display Changer\dc64cmd.exe" -monitor="\\.\DISPLAY2" -apply -lx=-3840

normal.bat:

"C:\Program Files (x86)\12noon Display Changer\dc64cmd.exe" -monitor="\\.\DISPLAY2" -more -lx=1920
"C:\Program Files (x86)\12noon Display Changer\dc64cmd.exe" -monitor="\\.\DISPLAY3" -apply -lx=3840

state.txt:

0 or 1 here
rookr
  • 41
1

You can do this using Display Changer from here. You will want to look at the -left | -right | -top | -bottom | -above | -below parameters.

I took this answer from a similar question: Change Display Arrangement via Batch/Command Line on Windows 7 if it doesn't work, their are other answers you may want to look into.

Curtis
  • 488