[英]Way to change Windows (7) monitors settings via script
i bought a new TV mainly as second monitor to my PC and I often need to change settings (extend display for movies, duplicate display for gaming, disable for work'n'browsing). 我买了一台新电视主要作为我的电脑的第二台显示器,我经常需要更改设置(扩展电影显示,重复显示游戏,禁用工作'浏览)。
Is there a way to switch among those settings via some script (batch most likely or VBS, whatever) so I dont't need to crawl through GUI all the time? 有没有办法通过某些脚本切换这些设置(批量最有可能或VBS,无论如何),所以我不需要一直爬过GUI? I am veeery lazy... Thanks
我很懒惰...谢谢
Firstly, not sure if you know the shortcut 首先,不确定你是否知道捷径
Windows + P
2 buttons seems pretty easy! 2个按钮看起来很简单!
but, you could write a batch file to run the programs with the appication displayswitch.exe included. 但是,您可以编写一个批处理文件来运行包含appication displayswitch.exe的程序。 displayswitch comes with windows 7 so you can have a batch file with:
displaywitch随Windows 7一起提供,因此您可以拥有一个批处理文件:
DisplaySwitch.exe /external
notepad.exe
then use this batch file to open notepad and it will always open and switch to the external display only. 然后使用此批处理文件打开记事本,它将始终打开并仅切换到外部显示器。
the following options are available: 可以使用以下选项:
Extend Display
DisplaySwitch.exe /extend
2nd monitor
DisplaySwitch.exe /external
Computers Monitor
DisplaySwitch.exe /internal
Duplicate Display
DisplaySwitch.exe /clone
Martyn 马丁
You can make a scrip with choose like i did: 您可以选择像我一样做一个脚本:
@ECHO OFF
CLS
ECHO 1.Monitor 2 i TV Duplicate
ECHO 2.Monitor 2 i Monitor 3 Extended
ECHO 3.Monitor 2 i TV Extended
ECHO.
CHOICE /C 123 /M "Izbor:"
IF ERRORLEVEL 3 GOTO Mon2TvExt
IF ERRORLEVEL 2 GOTO Mon2Mon3Ext
IF ERRORLEVEL 1 GOTO Mon2TvDupl
:Mon2TvDupl
ECHO 1.Monitor 2 i TV Duplicate
Duplicate Display
DisplaySwitch.exe /clone
GOTO End
:Mon2Mon3Ext
ECHO 2.Monitor 2 i Monitor 3 Extended
DisplaySwitch.exe /external
GOTO End
:Mon2TvExt
ECHO 3.Monitor 2 i TV Extended
Extend Display
DisplaySwitch.exe /extend
GOTO End
Pause
The TV is number 1, and two monitors are number 2 and number 3. 电视是1号,两个监视器是2号和3号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.