diff -r 1b55a5510213 -r 091708199d17 toggle_dualdisp.vbs --- a/toggle_dualdisp.vbs Thu Jan 21 14:04:22 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -Dim action -action = "asis" - -If WScript.Arguments.Count <> 1 then - WScript.quit -End If - -If WScript.Arguments.item(0) = "on" Then - action = "on" -Else - action = "off" -End If - - -' Dim Locator -' Dim Service -' Dim QfeSet -' Dim Qfe - -' Set Locator = WScript.CreateObject("WbemScripting.SWbemLocator") -' Set Service = Locator.ConnectServer -' Set QfeSet = Service.ExecQuery("Select * From Win32_DesktopMonitor") - -' Dim accum -' accum = 0 - -' If Qfeset.Count = 2 Then -' For Each Qfe In QfeSet -' accum = accum * 10 -' accum = accum + Qfe.Availability -' Next -' If accum = 38 Or accum = 83 Then -' action = "on" -' ElseIf accum = 33 Then -' action = "off" -' End If -' End If - -Dim objWsh -Set objWsh = WScript.CreateObject("WScript.Shell") -objWsh.Run "control.exe desk.cpl ,4" -Do Until objWsh.AppActivate("画面のプロパティ") - WScript.Sleep 100 -Loop - -If action = "on" Then - objWsh.SendKeys "{TAB}" - objWsh.SendKeys "2" - objWsh.SendKeys "{TAB 4}" - objWsh.SendKeys " " - objWsh.SendKeys "{UP 19}" - objWsh.SendKeys "{LEFT 29}" - objWsh.SendKeys "{DOWN 7}" - objWsh.SendKeys "{TAB 9}" - 'objWsh.SendKeys "{ENTER}" -ElseIf action = "off" Then - objWsh.SendKeys "{TAB}" - objWsh.SendKeys "2" - objWsh.SendKeys "{TAB 5}" - objWsh.SendKeys " " - objWsh.SendKeys "{TAB 8}" - 'objWsh.SendKeys "{ENTER}" -End If -