|
|
|
|
|
|
<script language="vbscript">
Dim objShell
Set objShell = CreateObject("WScript.Shell")
Dim Connections
Connections = Array(Array("Verbindung 1", "127.0.0.1"), Array("Verbindung 2", "localhost"), Array("Verbindung 3", "192.168.1.1"))
With objShell
.Run "Control ncpa.cpl"
execStepAfter 1, 2000
End With
function doStep(step)
msgbox "Step" & step
For i = 0 To UBound(Connections)
With objShell
if step = 1 then
.AppActivate "Netzwerkverbindungen"
execStepAfter step+1, 500
elseif step = 2 then
.SendKeys "%DN"
execStepAfter step+1, 500
elseif step = 3 then
.SendKeys "%W"
execStepAfter step+1, 500
elseif step = 4 then
.SendKeys "%NW"
execStepAfter step+1, 500
elseif step = 5 then
.SendKeys "%VW"
execStepAfter step+1, 500
elseif step = 6 then
.SendKeys "%N" & Connections(i)(0) & "%W"
execStepAfter step+1, 500
elseif step = 7 then
.SendKeys "%KW"
execStepAfter step+1, 500
elseif step = 8 then
.SendKeys "%H" & Connections(i)(1) & "%W"
execStepAfter step+1, 500
elseif step = 9 then
.SendKeys "{TAB}{TAB}{ENTER}"
execStepAfter step+1, 500
elseif step = 10 then
.SendKeys "{ESC}"
msgbox "fertig"
end if
End With
Next
end function
function execStepAfter(step, ms)
window.setTimeout "doStep " & step, ms
end function
</script>
|
|
|
|