Skip to content

Instantly share code, notes, and snippets.

@ahmadyan
Created August 29, 2012 17:15
Show Gist options
  • Save ahmadyan/3515756 to your computer and use it in GitHub Desktop.
Save ahmadyan/3515756 to your computer and use it in GitHub Desktop.
AutoIt Script file for Showing Desktop on (Extended Monitor Setting) & (Monitor 2 only), Only works on windows 7 with AutoIt, Highly system-dependent
Run("C:\WINDOWS\system32\control.exe desk.cpl", "C:\Windows\system32\")
WinWait("Screen Resolution")
ControlCommand("Screen Resolution", "", "ComboBox3", "SetCurrentSelection", "1")
ControlClick("Screen Resolution", "", "Button4")
WinWait("Display Settings")
ControlClick("Display Settings", "", "Button1")
Run("C:\WINDOWS\system32\control.exe desk.cpl", "C:\Windows\system32\")
WinWait("Screen Resolution")
ControlCommand("Screen Resolution", "", "ComboBox3", "SetCurrentSelection", "3")
ControlClick("Screen Resolution", "", "Button4")
WinWait("Display Settings")
ControlClick("Display Settings", "", "Button1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment