VBS 원 키 설정 VOIP 스 크 립 트 코드
Dim ws,fso,IE
Set IE = WScript.createobject("InternetExplorer.Application")
Set ws = WScript.CreateObject ("WSCript.shell")
Set fso=CreateObject("scripting.filesystemobject")
Const reboot="/content.cgi?form=M_SAV"
IE.menubar=0 ' IE
IE.AddressBar=1 ' IE
IE.ToolBar=0 ' IE
IE.StatusBar=1 ' IE
IE.FullScreen=0 ' IE
IE.Height=768
IE.Width=1024
IE.Resizable=1 ' IE
IE.visible=1 '
'IE.Navigate "192.168.46.3"
'============== Config =========
filepath=createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).ParentFolder.Path
file_config=filepath&"\config.ini"
Set file=fso.OpenTextFile(file_config,1)
'=========== : ==============
OneLine=file.ReadLine
OneLineStr=Split(OneLine,"=")
OneLineCount=UBound(split(OneLine,"="))
'MsgBox OneLineStr(1)
'=============== : ===========
TwoLine=file.ReadLine
TwoLineStr=Split(TwoLine,"=")
TwoLineCount=UBound(split(TwoLine,"="))
'MsgBox TwoLineStr(1)
'=============== :VOIP ============
ThreeLine=file.ReadLine
ThreeLineStr=Split(ThreeLine,"=")
ThreeLineCount=UBound(split(ThreeLine,"="))
'MsgBox ThreeLineStr(1)
'=============== : ============
FourLine=file.ReadLine
FourLineStr=Split(FourLine,"=")
FourLineCount=UBound(split(FourLine,"="))
'MsgBox FourLineStr(1)
'=============== : ============
FiveLine=file.ReadLine
FiveLineStr=Split(FiveLine,"=")
FiveLineCount=UBound(split(FiveLine,"="))
'MsgBox FiveLineStr(1)
'MainWeb()
Main()
'==================================================
Function Main()
IE.Navigate FourLineStr(1)
Do
WScript.Sleep 500
Loop Until IE.ReadyState=4
Login()
SipSetting()
InputParm()
VOIP()
RebootSys()
End Function
'======================================================
'
Function Login()
WScript.Sleep 1000
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys "admin"
ws.SendKeys "{TAB}"
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys "admin"
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{ENTER}"
End Function
'================================================
' sipsetting
Function SipSetting()
If IE.ReadyState=4 Then
WScript.Sleep 1000
ws.SendKeys "{TAB 5}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 500
ws.SendKeys "{TAB}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 2000
Else
MsgBox " !"
End If
End Function
'=============================================
'
Function InputParm()
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{DOWN}" '
WScript.Sleep 300
End Function
'=========================================
'
Function VOIP()
ws.SendKeys "{TAB}"
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys OneLineStr(1) 'display name
ws.SendKeys "{TAB}"
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys OneLineStr(1) 'user number
ws.SendKeys "{TAB}"
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys OneLineStr(1) 'auth id
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys TwoLineStr(1) 'password
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys ThreeLineStr(1) 'proxy ip
ws.SendKeys "{TAB}" 'domain
WScript.Sleep 200
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys ThreeLineStr(1)
'============= ===========
ws.SendKeys "{TAB 48}"
WScript.Sleep 500
ws.SendKeys "{TAB}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 1500
End Function
'========================================================
'
Function RebootSys()
WScript.Sleep 500
ws.SendKeys "{F4}"
WScript.Sleep 500
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys FourLineStr(1)&reboot
WScript.Sleep 500
' Set test=IE.document.getElementsByTagName ("Button")
ws.SendKeys "{ENTER}"
WScript.Sleep 2000
Set ALL = Ie.Document.getElementsByTagName("input") ' input, Reboot
For Each i In ALL
If i.value="Reboot" Then
'i.Click ' reboot
WScript.Sleep 1000
Ie.Document.parentwindow.execScript("top.location='content.cgi?_method_=reboot'") ' reboot
Exit For
End If
Next
WScript.Sleep 3000
MsgBox " , , ...",," "
If ws.AppActivate(" ") Then
ws.SendKeys "{ENTER}"
WScript.Sleep 2000
MsgBox " , , ...",," "
Else
'MsgBox " , !",," "
End If
End Function
'====================================================================
Function MainWeb()
'============= =====================
' : ,
' Function login()
' ws.run FiveLineStr(1)
' WScript.Sleep 3000
' ws.SendKeys "{F4}"
' WScript.Sleep 200
' ws.SendKeys "^a"
' WScript.Sleep 500
' ws.SendKeys FourLineStr(1)
' WScript.Sleep 500
' ws.SendKeys "{ENTER}"
' End Function
' :
ws.Run FourLineStr(1)
'=============== =====================
WScript.Sleep 5000
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys "admin"
ws.SendKeys "{TAB}"
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys "admin"
ws.SendKeys "{ENTER}"
'============ sip setting =============
WScript.Sleep 2000
ws.SendKeys "{TAB 5}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 500
ws.SendKeys "{TAB}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 2000
'============== =======================
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "{DOWN}" '
WScript.Sleep 300
'============== VOIP================
ws.SendKeys "{TAB}"
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys OneLineStr(1) 'display name
ws.SendKeys "{TAB}"
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys OneLineStr(1) 'user number
ws.SendKeys "{TAB}"
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys OneLineStr(1) 'auth id
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys TwoLineStr(1) 'password
ws.SendKeys "{TAB}"
WScript.Sleep 200
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys ThreeLineStr(1) 'proxy ip
ws.SendKeys "{TAB}" 'domain
WScript.Sleep 200
ws.SendKeys "^a"
WScript.Sleep 200
ws.SendKeys ThreeLineStr(1)
'============= ===========
ws.SendKeys "{TAB 48}"
WScript.Sleep 500
ws.SendKeys "{TAB}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 1500
'=============== ==========
ws.SendKeys "{TAB 18}"
WScript.Sleep 1000
ws.SendKeys "{ENTER}"
WScript.Sleep 1000
ws.SendKeys "{TAB 2}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 1000
If ws.AppActivate(" ") Then
ws.SendKeys "{ENTER}"
WScript.Sleep 1000
MsgBox " , , ...",," "
Else
MsgBox " , !",," "
End If
End Function
Set ws=Nothing
Set IE=Nothing
Set fso=Nothing
웹 페이지 부분 JS 코드:이 글 은 여기까지 소개 되 었 으 니 앞으로 많은 성원 부 탁 드 리 겠 습 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
VBS 스 크 립 트 에서 알림 을 실행 할 수 없습니다.Windows 에서 지정 한 장치 경로 나 파일 에 접근 할 수 없습니다.텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.