好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > VBS一鍵配置VOIP腳本代碼

VBS一鍵配置VOIP腳本代碼

熱門標簽:地圖標注政府哪個部門管 齊齊哈爾高德地圖標注店 除了地圖標注還有這種生意嗎 佛山真人電銷機器人廠家 神行者美術館地圖標注 東營快遞外呼系統 哪里有便宜的地圖標注公司 如何用機器人進行電銷 百度地圖標注點距離代碼

代碼比較長,對vbs感興趣的朋友可以參考一下

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代碼:

div id="content" width="650">
form name="M_SAV" method="GET" enctype="multipart/form-data" onReset="" action="content.cgi">
input type=HIDDEN name="_method_" value="apply">
input type=HIDDEN name="form" value="M_SAV">
input type=HIDDEN name="commit" value="0">
table id="cFORM" width="650" border="0" cellspacing="0" cellpadding="0" >
tr>td>nbsp/td>/tr>
/table>table width="500">td align="center">
input type=BUTTON onclick="javascript:if ( confirm('Reboot') ) top.location='content.cgi?_method_=reboot';" target="_top" value="Reboot">/a>
/td>/table>/form>

這篇文章就介紹到這了,希望大家以后多多支持腳本之家。

標簽:四平 湖州 邢臺 文山 海口 銅川 鶴壁 西安

巨人網絡通訊聲明:本文標題《VBS一鍵配置VOIP腳本代碼》,本文關鍵詞  VBS,一鍵,配置,VOIP,腳本,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《VBS一鍵配置VOIP腳本代碼》相關的同類信息!
  • 本頁收集關于VBS一鍵配置VOIP腳本代碼的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 亚洲精品乱码久久久久久蜜桃麻豆| 指尖传出的真挚热情| 国产学生不戴套在线看| 国产精品偷伦在线观看| 韩国美女人成网站在线看看| 午夜dj在线观看免费完整高清图片| 九月丁香婷婷亚洲综合色 | 古代一级毛片| 类似爱情无删减版全集| 国产真实伦在线观看视频第7集 | 色又黄又爽18禁免费视频| 男女做爰猛烈啪啪床动作图片| 亚洲精品?无码一区二| **美女毛片| 九九国产精品| 岳母性事| 亚洲88AV无码秘?蜜桃成熟时| 国产 视频 99 kai| 巜趁夫不在给给公侵犯了一天礼| 丁香九月婷婷| 一级婬片A片东京热无码人妻色欲| 男人把女人下面通爽的视频| 国产AV无遮挡喷水白浆铁牛视频 | 韩国大尺度电影| 久久久久久久久久福利| 性俄斯少妇交XXOO| aaa黄毛片| 3d动漫爆乳女教师| 周秀娜一级婬片A片在线观看| XiuRen秀人网无圣光| 香港三级影片| ol制服撕破肉色薄丝袜美腿| www.日本高清视频| 麻豆精品传媒一二三区入口| 女教师日记2暴露未删版在线播放| 欲色游乐园高h| 男男网页| 三级自拍视频| 人妻斩り56歳佳子AV| 99re6久热只有精品6在线直播| 97国产精品免费无码视频蝌蚪网|