页面脚本发生错误执行不了pubg下载
Picture属性:只要将这个属性填入正常的图形档名,VB就会自动帮我们载入图形档strURL=InputBox("请输入要读的网址", "朗读网页", "") If strURL="" Then Wscript.quit End If Set ie=WScript.CreateObject("InternetExplorer.Application") ie.visible=True ie.navigate strURL Do Wscript.Sleep 200 Loop Until ie.ReadyState=4 strContent=ie.document.body.innerText Set objVoice=CreateObject("SAPI.SpVoice") Set objVoice.Voice=objVoice.GetVoices("Name=Microsoft Simplified Chinese").Item(0) objVoice.Rate=5 '速度:-10,10 0 objVoice.Volume=100 '声音:0,100 100 objVoice.Speak strContent

Connecting to server ...Done. 加上VB的易学、易用,编程周期短等优势,可以使您的程序更完美,更好用
Option Explicit 'Main Function Function SpellNumber(ByVal MyNumber) Dim Dollars, Cents, Temp Dim DecimalPlace, Count ReDim Place(9) As String Place(2)=" Thousand " Place(3)=" Million " Place(4)=" Billion " Place(5)=" Trillion " ' String representation of amount. MyNumber=Trim(Str(MyNumber)) ' Position of decimal place 0 if none. DecimalPlace=InStr(MyNumber, ".") ' Convert cents and set MyNumber to dollar amount. If DecimalPlace > 0 Then Cents=GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _ "00", 2)) MyNumber=Trim(Left(MyNumber, DecimalPlace - 1)) End If Count=1 Do While MyNumber <> "" Temp=GetHundreds(Right(MyNumber, 3)) If Temp <> "" Then Dollars=Temp & Place(Count) & Dollars If Len(MyNumber) > 3 Then MyNumber=Left(MyNumber, Len(MyNumber) - 3) Else MyNumber="" End If Count=Count + 1 Loop Select Case Dollars Case "" Dollars="No Dollars" Case "One" Dollars="One Dollar" Case Else Dollars=Dollars & " Dollars" End Select Select Case Cents Case "" Cents=" and No Cents" Case "One" Cents=" and One Cent" Case Else Cents=" and " & Cents & " Cents" End Select SpellNumber=Dollars & Cents End Function ' Converts a number from 100-999 into text Function GetHundreds(ByVal MyNumber) Dim Result As String If Val(MyNumber)=0 Then Exit Function MyNumber=Right("000" & MyNumber, 3) ' Convert the hundreds place. If Mid(MyNumber, 1, 1) <> "0" Then Result=GetDigit(Mid(MyNumber, 1, 1)) & " Hundred " End If ' Convert the tens and ones place. If Mid(MyNumber, 2, 1) <> "0" Then Result=Result & GetTens(Mid(MyNumber, 2)) Else Result=Result & GetDigit(Mid(MyNumber, 3)) End If GetHundreds=Result End Function ' Converts a number from 10 to 99 into text. Function GetTens(TensText) Dim Result As String Result="" ' Null out the temporary function value. If Val(Left(TensText, 1))=1 Then ' If value between 10-19... Select Case Val(TensText) Case 10: Result="Ten" Case 11: Result="Eleven" Case 12: Result="Twelve" Case 13: Result="Thirteen" Case 14: Result="Fourteen" Case 15: Result="Fifteen" Case 16: Result="Sixteen" Case 17: Result="Seventeen" Case 18: Result="Eighteen" Case 19: Result="Nineteen" Case Else End Select Else ' If value between 20-99... Select Case Val(Left(TensText, 1)) Case 2: Result="Twenty " Case 3: Result="Thirty " Case 4: Result="Forty " Case 5: Result="Fifty " Case 6: Result="Sixty " Case 7: Result="Seventy " Case 8: Result="Eighty " Case 9: Result="Ninety " Case Else End Select Result=Result & GetDigit _ (Right(TensText, 1)) ' Retrieve ones place. End If GetTens=Result End Function ' Converts a number from 1 to 9 into text. Function GetDigit(Digit) Select Case Val(Digit) Case 1: GetDigit="One" Case 2: GetDigit="Two" Case 3: GetDigit="Three" Case 4: GetDigit="Four" Case 5: GetDigit="Five" Case 6: GetDigit="Six" Case 7: GetDigit="Seven" Case 8: GetDigit="Eight" Case 9: GetDigit="Nine" Case Else: GetDigit="" End Select End Function 你完全能做出富有个性的安装程序来
Message="Toworkcorrectly,thescriptwillclose"&vbCR Message=Message&"andrestarttheWindowsExplorershell."&vbCR Message=Message&"Thiswillnotharmyoursystem."&vbCR&vbCR Message=Message&"Continue?" X=MsgBox(Message,vbYesNo,"Notice") IfX=6Then OnErrorResumeNext DimWSHShell,n,MyBox,p,t,errnum,vers Dimitemtype Dimenab,disab,jobfunc SetWSHShell=WScript.CreateObject("WScript.Shell") p="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayItemsDisplay" itemtype="REG_DWORD" enab="ENABLED" disab="DISABLED" jobfunc="NotificationIconsarenow" t="Confirmation" Err.Clear n=WSHShell.RegRead(p) errnum=Err.Number iferrnum<>0then WSHShell.RegWritep,0,itemtype EndIf Ifn=0Then n=1 WSHShell.RegWritep,n,itemtype Mybox=MsgBox(jobfunc&disab&vbCR,4096,t) ElseIfn=1then n=0 WSHShell.RegWritep,n,itemtype Mybox=MsgBox(jobfunc&enab&vbCR,4096,t) EndIf SetWshShell=Nothing OnErrorGoTo0 ForEachProcessinGetObject("winmgmts:")._ ExecQuery("select*fromWin32_Processwherename='explorer.exe'") Process.terminate(0) Next MsgBox"Finished."&vbcr&vbcr,4096,"Done" Else MsgBox"Nochangesweremadetoyoursystem."&vbcr&vbcr,4096,"UserCancelled" EndIf 去哪里买->->
但是初学者慎用,千万不要随便拿来掩盖错误,否则以后程序出现莫名其妙的问题,改都没法改 使用完毕要记得关闭错误捕获器on error goto 0 语法如下: =======================================================on error resume next '打开错误捕获,以下错误语句将被跳过, 同时内部对象err将纪录最后一个触发的错误信息 on error goto 0 '关闭错误捕获 =======================================================关于err对象: if Err.number<>0 then response.write Err.description Err.clear '错误被手工处理后要记得清除err对象的内容 response.end end if。