Acabamos descobrindo isso graças a Curtis . Eu usei o Display Changer para fazer com que os displays mudem. Os arquivos em lote chamam
Eu escrevi um script python que faz dois arquivos em lote e decide quais executar com base no número em 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()
Os scripts em lote:
csgo.bat:
"C:\Program Files (x86)noon Display Changer\dc64cmd.exe" -monitor="\.\DISPLAY3" -more -lx=-1920
"C:\Program Files (x86)noon Display Changer\dc64cmd.exe" -monitor="\.\DISPLAY2" -apply -lx=-3840
normal.bat:
"C:\Program Files (x86)noon Display Changer\dc64cmd.exe" -monitor="\.\DISPLAY2" -more -lx=1920
"C:\Program Files (x86)noon Display Changer\dc64cmd.exe" -monitor="\.\DISPLAY3" -apply -lx=3840
state.txt:
0 or 1 here