# HG changeset patch # User Shingo W. Kagami # Date 1264081570 -32400 # Node ID 091708199d17d7b9c767141259472edee50e6874 # Parent 1b55a55102139b79208d7ad293535082f2a4d886 bat and vbs files are moved to ~/lib. diff -r 1b55a5510213 -r 091708199d17 lan_dhcp.bat --- a/lan_dhcp.bat Thu Jan 21 14:04:22 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -wscript C:\cygwin\home\swk\bin\toggle_if.vbs wireless disable -wscript C:\cygwin\home\swk\bin\toggle_if.vbs lan enable -netsh interface ip set address "ローカル エリア接続" dhcp -netsh interface ip set dns "ローカル エリア接続" dhcp -netsh interface ip set wins "ローカル エリア接続" dhcp diff -r 1b55a5510213 -r 091708199d17 lan_ic.bat --- a/lan_ic.bat Thu Jan 21 14:04:22 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -wscript C:\cygwin\home\swk\bin\toggle_if.vbs wireless disable -wscript C:\cygwin\home\swk\bin\toggle_if.vbs lan enable -netsh interface ip set address "ローカル エリア接続" static 10.240.10.207 255.255.255.0 10.240.10.1 1 -netsh interface ip set dns "ローカル エリア接続" static 130.34.54.2 -netsh interface ip add dns "ローカル エリア接続" 130.34.232.25 diff -r 1b55a5510213 -r 091708199d17 mamefile.sh --- a/mamefile.sh Thu Jan 21 14:04:22 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - /cygdrive/c/local/Mame5/Mame5.exe - exit -fi - -/cygdrive/c/local/Mame5/MameFile5.exe `cygpath -wa $1` 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 - diff -r 1b55a5510213 -r 091708199d17 toggle_if.vbs --- a/toggle_if.vbs Thu Jan 21 14:04:22 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -if WScript.Arguments.Count <> 2 then - wscript.quit -end if - -Dim sConnectionName -if WScript.Arguments.Item(0) = "lan" then - sConnectionName = "ローカル エリア接続" -else - sConnectionName = "ワイヤレス ネットワーク接続" -end if - -Dim sVerb -if WScript.Arguments.Item(1) = "enable" then - sVerb = "有効にする(&A)" -else - sVerb = "無効にする(&B)" -end if - - -Const ssfCONTROLS = 3 -Const sConPaneName = "ネットワーク接続" - -set shellApp = createobject("shell.application") -set oControlPanel = shellApp.Namespace(ssfCONTROLS) -set oNetConnections = nothing - -for each folderitem in oControlPanel.items - if folderitem.name = sConPaneName then - set oNetConnections = folderitem.getfolder: exit for - end if -next - -if oNetConnections is nothing then - wscript.quit -end if - -set oLanConnection = nothing -for each folderitem in oNetConnections.items - if lcase(folderitem.name) = lcase(sConnectionName) then - set oLanConnection = folderitem: exit for - end if -next - -if oLanConnection is nothing then - wscript.quit -end if - -for each verb in oLanConnection.verbs - if verb.name = sVerb then - verb.Doit - WScript.Sleep 2000 - end if -next diff -r 1b55a5510213 -r 091708199d17 wireless_dhcp.bat --- a/wireless_dhcp.bat Thu Jan 21 14:04:22 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -wscript C:\cygwin\home\swk\bin\toggle_if.vbs lan disable -wscript C:\cygwin\home\swk\bin\toggle_if.vbs wireless enable -netsh interface ip set address "ワイヤレス ネットワーク接続" dhcp -netsh interface ip set dns "ワイヤレス ネットワーク接続" dhcp -netsh interface ip set wins "ワイヤレス ネットワーク接続" dhcp diff -r 1b55a5510213 -r 091708199d17 wireless_ic.bat --- a/wireless_ic.bat Thu Jan 21 14:04:22 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -wscript C:\cygwin\home\swk\bin\toggle_if.vbs lan disable -wscript C:\cygwin\home\swk\bin\toggle_if.vbs wireless enable -netsh interface ip set address "ワイヤレス ネットワーク接続" static 10.240.10.207 255.255.255.0 10.240.10.1 1 -netsh interface ip set dns "ワイヤレス ネットワーク接続" static 130.34.54.2 -netsh interface ip add dns "ワイヤレス ネットワーク接続" 130.34.232.25