WSH中可以运用的InternetExplorer.Application
如例:
原代码:
setie=createobject("internetexplorer.application")
msgbox"显示IE"
ie.visible=true
msgbox"隐藏ie"
ie.visible=false
msgbox"关闭ie"
ie.quit
下面这是internetexplorer.application的方法
如上面用的
ie.visible==false同ie.visible=true
就是用这个方法
PropertyVisibleAsBoolean
Determineswhethertheapplicationisvisibleorhidden.
方法:
PropertyAddressBarAsBoolean
Controlswhetheraddressbarisshown
PropertyApplicationAsObject
Returnstheapplicationautomationobjectifaccessible,thisautomationobjectotherwise..
PropertyBusyAsBoolean
Querytoseeifsomethingisstillinprogress.
SubClientToWindow(pcxAsLong,pcyAsLong)
Convertsclientsizesintowindowsizes.
PropertyContainerAsObject
Returnsthecontainer/parentautomationobject,ifany.
PropertyDocumentAsObject
ReturnstheactiveDocumentautomationobject,ifany.
SubExecWB(ByValcmdIDAsOLECMDID,ByValcmdexecoptAsOLECMDEXECOPT,[pvaIn],[pvaOut])
IOleCommandTarget::Exec
PropertyFullNameAsString
Returnsfilespecificationoftheapplication,includingpath.
PropertyFullScreenAsBoolean
Maximizeswindowandturnsoffstatusbar,toolbar,menubar,andtitlebar.
FunctionGetProperty(ByValPropertyAsString)
RetrievetheAssociatedvalueforthepropertyvtvalueinthecontextoftheobject.
SubGoBack
Navigatestothepreviousiteminthehistorylist.
SubGoForward
Navigatestothenextiteminthehistorylist.
SubGoHome
Gohome/startpage.
SubGoSearch
GoSearchPage.
PropertyHeightAsLong
Theverticaldimension(pixels)oftheframewindow/object.
PropertyHWNDAsLong
ReturnstheHWNDofthecurrentIEwindow.
PropertyLeftAsLong
Thehorizontalposition(pixels)oftheframewindowrelativetothescreen/container.
PropertyLocationNameAsString
Getstheshort(UI-friendly)nameoftheURL/filecurrentlyviewed.
PropertyLocationURLAsString
GetsthefullURL/pathcurrentlyviewed.
PropertyMenuBarAsBoolean
Controlswhethermenubarisshown.
PropertyNameAsString
Returnsnameoftheapplication.
SubNavigate(ByValURLAsString,[Flags],[TargetFrameName],[PostData],[Headers])
NavigatestoaURLorfile.
SubNavigate2(URL,[Flags],[TargetFrameName],[PostData],[Headers])
NavigatestoaURLorfileorpidl.
PropertyOfflineAsBoolean
Controlsiftheframeisoffline(readfromcache)
PropertyParentAsObject
Returnstheautomationobjectofthecontainer/parentifoneexistsorthisautomationobject.
PropertyPathAsString
Returnsthepathtotheapplication.
SubPutProperty(ByValPropertyAsString,ByValvtvalue)
AssociatesvtvaluewiththenameszPropertyinthecontextoftheobject.
FunctionQueryStatusWB(ByValcmdIDAsOLECMDID)AsOLECMDF
IOleCommandTarget::QueryStatus
SubQuit
Exitsapplicationandclosestheopendocument.
PropertyReadyStateAstagREADYSTATE
nodescriptionavailable
SubRefresh
Refreshthecurrentlyviewedpage.
SubRefresh2([Level])
Refreshthecurrentlyviewedpage.
PropertyRegisterAsBrowserAsBoolean
RegistersOCasatop-levelbrowser(fortargetnameresolution)
PropertyRegisterAsDropTargetAsBoolean
RegistersOCasadroptargetfornavigation
PropertyResizableAsBoolean
Controlswhetherthewindowisresizable
SubShowBrowserBar(pvaClsid,[pvarShow],[pvarSize])
SetBrowserBartoClsid
PropertySilentAsBoolean
Controlsifanydialogboxescanbeshown
PropertyStatusBarAsBoolean
Turnonoroffthestatusbar.
PropertyStatusTextAsString
TextofStatuswindow.
SubStop
Stopsopeningafile.
PropertyTheaterModeAsBoolean
Controlsifthebrowserisintheatermode
PropertyToolBarAsLong
Controlswhichtoolbarisshown.
PropertyTopAsLong
Theverticalposition(pixels)oftheframewindowrelativetothescreen/container.
PropertyTopLevelContainerAsBoolean
ReturnsTrueifthisisthetoplevelobject.
PropertyTypeAsString
Returnsthetypeofthecontaineddocumentobject.
PropertyVisibleAsBoolean
Determineswhethertheapplicationisvisibleorhidden.
PropertyWidthAsLong
Thehorizontaldimension(pixels)oftheframewindow/object.