Last active
August 29, 2015 14:26
-
-
Save bse666/67ad7ee67132fab8d6e1 to your computer and use it in GitHub Desktop.
Switch Monitor Configuration easily in Windows (DE) with this autoit scripts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run("C:\WINDOWS\system32\control.exe desk.cpl", "C:\Windows\system32\") | |
WinWait("Bildschirmauflösung") | |
ControlClick("Bildschirmauflösung", "", "Button3") | |
selectmon('MD6155AN') | |
ControlCommand("Bildschirmauflösung", "", "ComboBox3", "SetCurrentSelection", "1") | |
selectmon('MD32119PR') | |
ControlCommand("Bildschirmauflösung", "", "ComboBox3", "SetCurrentSelection", "2") | |
uebernehmen() | |
selectmon('32LG5600') | |
ControlCommand("Bildschirmauflösung", "", "ComboBox3", "SetCurrentSelection", "3") | |
uebernehmen() | |
Sleep( "1000" ) | |
WinClose("Bildschirmauflösung") | |
Func selectmon($string) | |
$k = 0 | |
While -1 | |
ControlCommand("Bildschirmauflösung", "", "ComboBox1", "SetCurrentSelection", $k) | |
$index = ControlCommand("Bildschirmauflösung", "", "ComboBox1", "GetCurrentSelection", "") | |
If ( StringInStr($index, $string))Then ExitLoop | |
$k = $k + 1 | |
WEnd | |
EndFunc | |
Func uebernehmen() | |
If ControlCommand("Bildschirmauflösung", "", "Button6", "IsEnabled", "") Then | |
ControlClick("Bildschirmauflösung", "", "Button6") | |
If WinWait("Anzeigeeinstellungen", "", 4) Then | |
ControlClick("Anzeigeeinstellungen", "", "Button1") | |
EndIf | |
EndIf | |
EndFunc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run("C:\WINDOWS\system32\control.exe desk.cpl", "C:\Windows\system32\") | |
WinWait("Bildschirmauflösung") | |
selectmon('32LG5600') | |
ControlCommand("Bildschirmauflösung", "", "ComboBox3", "SetCurrentSelection", "2") | |
uebernehmen() | |
selectmon('32LG5600') | |
ControlClick("Bildschirmauflösung", "", "Button3") | |
uebernehmen() | |
selectmon('MD6155AN') | |
ControlCommand("Bildschirmauflösung", "", "ComboBox3", "SetCurrentSelection", "3") | |
selectmon('MD32119PR') | |
ControlCommand("Bildschirmauflösung", "", "ComboBox3", "SetCurrentSelection", "3") | |
uebernehmen() | |
Sleep( "1000" ) | |
WinClose("Bildschirmauflösung") | |
Func selectmon($string) | |
$k = 0 | |
While -1 | |
ControlCommand("Bildschirmauflösung", "", "ComboBox1", "SetCurrentSelection", $k) | |
$index = ControlCommand("Bildschirmauflösung", "", "ComboBox1", "GetCurrentSelection", "") | |
If ( StringInStr($index, $string))Then ExitLoop | |
$k = $k + 1 | |
WEnd | |
EndFunc | |
Func uebernehmen() | |
If ControlCommand("Bildschirmauflösung", "", "Button6", "IsEnabled", "") Then | |
ControlClick("Bildschirmauflösung", "", "Button6") | |
If WinWait("Anzeigeeinstellungen", "", 4) Then | |
ControlClick("Anzeigeeinstellungen", "", "Button1") | |
EndIf | |
EndIf | |
EndFunc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment