真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

VBS一鍵配置VOIP腳本代碼怎么寫

這篇文章給大家介紹VBS一鍵配置VOIP腳本代碼怎么寫,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。

創(chuàng)新互聯(lián)2013年開創(chuàng)至今,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站建設(shè)、做網(wǎng)站網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元宣威做網(wǎng)站,已為上家服務(wù),為宣威各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:13518219792

代碼比較長(zhǎng),對(duì)vbs感興趣的朋友可以參考一下

Dim?ws,fso,IESet?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對(duì)象菜單欄IE.AddressBar=1?'顯示IE對(duì)象地址欄IE.ToolBar=0?'顯示IE對(duì)象工具欄IE.StatusBar=1?'不顯示IE對(duì)象狀態(tài)欄IE.FullScreen=0?'全屏化IE對(duì)象IE.Height=768IE.Width=1024IE.Resizable=1?'設(shè)置IE對(duì)象大小是否可以被改動(dòng)IE.visible=1?'設(shè)置是否可見?'IE.Navigate?"192.168.46.3"'==============讀Config配置文件=========????filepath=createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).ParentFolder.Pathfile_config=filepath&"\config.ini"Set?file=fso.OpenTextFile(file_config,1)????'===========取第一行數(shù)據(jù):號(hào)碼==============OneLine=file.ReadLineOneLineStr=Split(OneLine,"=")OneLineCount=UBound(split(OneLine,"="))'MsgBox?OneLineStr(1)???????????????????????'===============取第二行數(shù)據(jù):密碼===========TwoLine=file.ReadLineTwoLineStr=Split(TwoLine,"=")TwoLineCount=UBound(split(TwoLine,"="))'MsgBox?TwoLineStr(1)????'===============取第三行數(shù)據(jù):VOIP服務(wù)地址============ThreeLine=file.ReadLineThreeLineStr=Split(ThreeLine,"=")ThreeLineCount=UBound(split(ThreeLine,"="))'MsgBox?ThreeLineStr(1)????'===============取第四行數(shù)據(jù):對(duì)講設(shè)備地址============FourLine=file.ReadLineFourLineStr=Split(FourLine,"=")FourLineCount=UBound(split(FourLine,"="))'MsgBox?FourLineStr(1)????'===============取第五行數(shù)據(jù):瀏覽器安裝目錄============FiveLine=file.ReadLineFiveLineStr=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?'======================================================'登錄系統(tǒng)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?'================================================'進(jìn)入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?"進(jìn)入配置界面失?。??????????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}"??'選擇開啟狀態(tài)????WScript.Sleep?300End?Function?'========================================='配置參數(shù)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?'========================================================'修改參數(shù)后重啟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")??'檢測(cè)網(wǎng)頁(yè)元素是否標(biāo)簽為input,且值等于Reboot????For?Each?i?In?ALL????If?i.value="Reboot"?Then???????'i.Click??'點(diǎn)擊reboot按鈕???????????????WScript.Sleep?1000???????????????Ie.Document.parentwindow.execScript("top.location='content.cgi?_method_=reboot'")??'直接執(zhí)行reboot確認(rèn)操作????????Exit?For?????????End?If????Next????????WScript.Sleep?3000????????????MsgBox?"配置已完成,設(shè)備正在重啟,請(qǐng)耐心等待...",,"提示"????If?ws.AppActivate("來(lái)自網(wǎng)頁(yè)的消息")?Then?????????????????ws.SendKeys?"{ENTER}"????????WScript.Sleep?2000????????????????MsgBox?"配置已完成,設(shè)備正在重啟,請(qǐng)耐心等待...",,"提示"????????????Else?????????'MsgBox?"配置未成功,請(qǐng)重新檢查配置!",,"提示"????????????End?If?End?Function?'====================================================================Function?MainWeb()????'=============啟動(dòng)地址====================='方式一:自定義瀏覽器啟動(dòng),需配置路徑'???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????'方式二:用系統(tǒng)默認(rèn)瀏覽器啟動(dòng)?????ws.Run?FourLineStr(1)????'===============登錄設(shè)備=====================????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}"????????'============進(jìn)入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????????????'==============進(jìn)入編輯狀態(tài)=======================????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}"??'選擇開啟狀態(tài)????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("來(lái)自網(wǎng)頁(yè)的消息")?Then?????????????ws.SendKeys?"{ENTER}"????????WScript.Sleep?1000????????????????MsgBox?"配置已完成,設(shè)備正在重啟,請(qǐng)耐心等待...",,"提示"????????????Else?????????MsgBox?"配置未成功,請(qǐng)重新檢查配置!",,"提示"????????????End?If?End?Function?Set?ws=Nothing?Set?IE=Nothing?Set?fso=Nothing?

網(wǎng)頁(yè)部分JS代碼:

 

關(guān)于VBS一鍵配置VOIP腳本代碼怎么寫就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。


本文標(biāo)題:VBS一鍵配置VOIP腳本代碼怎么寫
URL標(biāo)題:http://weahome.cn/article/pdsogd.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部