91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

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

發布時間:2021-10-13 12:00:47 來源:億速云 閱讀:125 作者:柒染 欄目:編程語言

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

代碼比較長,對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對象菜單欄IE.AddressBar=1?'顯示IE對象地址欄IE.ToolBar=0?'顯示IE對象工具欄IE.StatusBar=1?'不顯示IE對象狀態欄IE.FullScreen=0?'全屏化IE對象IE.Height=768IE.Width=1024IE.Resizable=1?'設置IE對象大小是否可以被改動IE.visible=1?'設置是否可見?'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)????'===========取第一行數據:號碼==============OneLine=file.ReadLineOneLineStr=Split(OneLine,"=")OneLineCount=UBound(split(OneLine,"="))'MsgBox?OneLineStr(1)???????????????????????'===============取第二行數據:密碼===========TwoLine=file.ReadLineTwoLineStr=Split(TwoLine,"=")TwoLineCount=UBound(split(TwoLine,"="))'MsgBox?TwoLineStr(1)????'===============取第三行數據:VOIP服務地址============ThreeLine=file.ReadLineThreeLineStr=Split(ThreeLine,"=")ThreeLineCount=UBound(split(ThreeLine,"="))'MsgBox?ThreeLineStr(1)????'===============取第四行數據:對講設備地址============FourLine=file.ReadLineFourLineStr=Split(FourLine,"=")FourLineCount=UBound(split(FourLine,"="))'MsgBox?FourLineStr(1)????'===============取第五行數據:瀏覽器安裝目錄============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?'======================================================'登錄系統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?300End?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代碼:

<p 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腳本代碼怎么寫就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

荃湾区| 松桃| 临泽县| 双牌县| 台山市| 政和县| 绍兴县| 宣武区| 靖西县| 清徐县| 光山县| 唐山市| 临桂县| 汶川县| 新绛县| 新乐市| 周口市| 临清市| 济宁市| 锡林郭勒盟| 孟津县| 固原市| 图片| 彰化市| 建德市| 涡阳县| 绥芬河市| 韶关市| 九江市| 平邑县| 阿瓦提县| 师宗县| 奉新县| 讷河市| 白银市| 保山市| 抚松县| 甘洛县| 嘉鱼县| 丘北县| 道真|