1、 5-1.VBS.2 5-2.VBS.4 5-3.VBS.6 5-4.VBS.8 5-5.VBS.11 5-6.VBS.13 5-7.VBS.15 5-8.VBS.18 5-9.VBS.21 5-10.VBS.24 5-11.VBS.27 5-12.VBS.30 5-13.VBS.37 5-1.VBS-the following lines have been added to ensure all required COM objects are available on your system. script uses the following components: internete
2、xplorer.applicationCheckCOM-end of COM-object checking code-set ie = CreateObject(“InternetExplorer.Application“)MsgBox “Object Type: “ & TypeName(ie)ie.visible = trueMsgBox “Internet Explorer is visible now!“ie.visible = falseMsgBox “Now its hidden!“ie.Quit - the following code had been automatical
3、ly added to ensure all required COM objects are installed.function COMExists(name) checks whether a specific COM object is installed on your local machineset cwsh = CreateObject(“WScript.Shell“)on error resume nextdummy = cwsh.RegRead(“HKCR“ & name & “)if err.number0 thenCOMExists = falseelseCOMExis
4、ts = trueend ifend functionsub CheckCOMif not COMExists(“internetexplorer.application“) thenmsg=“COM-Object “internetexplorer.application“ is required. This object is currently not installed on your system.“ & vbCrmsg = msg & “Install the Internet Explorer Version 4.0 or above.“ & vbCrMsgBox msg, vb
5、Exclamationend ifend sub- end of COM object checking code (C) 2000 by Dr. T. Weltner - all rights reserved. 5-3.VBS-the following lines have been added to ensure all required COM objects are available on your system. script uses the following components: internetexplorer.application scripting.filesy
6、stemobjectCheckCOM-end of COM-object checking code-set ie = CreateObject(“InternetExplorer.Application“)title = “My Output Window“page = “JavaScript:“ & title _& “ie.navigate page wait for the page to be fully initialized:doloop while ie.ReadyState0 thenCOMExists = falseelseCOMExists = trueend ifend
7、 functionsub CheckCOMif not COMExists(“internetexplorer.application“) thenmsg=“COM-Object “internetexplorer.application“ is required. This object is currently not installed on your system.“ & vbCrmsg = msg & “Install the Internet Explorer Version 4.0 or above.“ & vbCrMsgBox msg, vbExclamationend ifi
8、f not COMExists(“scripting.filesystemobject“) thenmsg=“COM-Object “scripting.filesystemobject“ is required. This object is currently not installed on your system.“ & vbCrmsg = msg & “Reinstall the Windows Scripting Host!“ & vbCrMsgBox msg, vbExclamationend ifend sub- end of COM object checking code
9、(C) 2000 by Dr. T. Weltner - all rights reserved. 5-4.VBS-the following lines have been added to ensure all required COM objects are available on your system. script uses the following components: internetexplorer.application scripting.filesystemobjectCheckCOM-end of COM-object checking code- this s
10、tatement invokes the event sink feature:set ie = WScript.CreateObject(“InternetExplorer.Application“, _“event_“)title = “My Output Window“page = “JavaScript:“ & title _& “ie.navigate page wait for the page to be fully initialized:doloop while ie.ReadyState0 thenCOMExists = falseelseCOMExists = truee
11、nd ifend functionsub CheckCOMif not COMExists(“internetexplorer.application“) thenmsg=“COM-Object “internetexplorer.application“ is required. This object is currently not installed on your system.“ & vbCrmsg = msg & “Install the Internet Explorer Version 4.0 or above.“ & vbCrMsgBox msg, vbExclamatio
12、nend ifif not COMExists(“scripting.filesystemobject“) thenmsg=“COM-Object “scripting.filesystemobject“ is required. This object is currently not installed on your system.“ & vbCrmsg = msg & “Reinstall the Windows Scripting Host!“ & vbCrMsgBox msg, vbExclamationend ifend sub- end of COM object checking code (C) 2000 by Dr. T. Weltner - all rights reserved.
Copyright © 2018-2021 Wenke99.com All rights reserved
工信部备案号:浙ICP备20026746号-2
公安局备案号:浙公网安备33038302330469号
本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。