0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

vbsの作法 その62

Posted at

概要

vbsの作法、調べてみた。
練習問題、やってみた。

練習問題

Windows11でInternet Explorer11を起動して、イベントを取得せよ。

サンプルコード



Dim objIE
Set objIE = WScript.CreateObject("InternetExplorer.Application", "IE11_")
objIE.Visible = True
objIE.Navigate "about:blank"

Do
  WScript.Sleep 200
Loop

Sub IE11_BeforeNavigate(browser, url, flags, target, postdata, headers, cancel)
	msgbox "BeforeNavigate"
End Sub

Sub IE11_BeforeNavigate2(browser, url, flags, target, postdata, headers, cancel)
	msgbox "BeforeNavigate2"
End Sub

Sub IE11_DocumentComplete(browser, url)
	msgbox "DocumentComplete"
End Sub

Sub IE11_DownloadBegin()
	msgbox "DownloadBegin"
End Sub

Sub IE11_DownloadComplete()
	msgbox "DownloadComplete"
End Sub

Sub IE11_FileDownload(ActiveDocument, Cancel)
	msgbox "FileDownload"
End Sub

Sub IE11_NavigateComplete(browser, url)
	msgbox "NavigateComplete"
End Sub

Sub IE11_NavigateComplete2(browser, url)
	msgbox "NavigateComplete2"
End Sub

Sub IE11_NavigateError(browser, url, target, status, cancel)
	msgbox "NavigateError"
End Sub

Sub IE11_NewProcess(lCauseFlag, pWB2, Cancel)
	msgbox "NewProcess"
End Sub

Sub IE11_NewWindow(browser, Cancel)
	msgbox "NewWindow"
End Sub

Sub IE11_NewWindow2(browser, Cancel)
	msgbox "NewWindow2"
End Sub

Sub IE11_NewWindow3(browser, Cancel, dwFlags, bstrUrlContext, bstrUrl)
	msgbox "NewWindow3"
End Sub

Sub IE11_OnFullScreen(FullScreen)
	msgbox "OnFullScreen"
End Sub

Sub IE11_OnMenuBar(MenuBar)
	msgbox "OnMenuBar"
End Sub

Sub IE11_OnQuit()
	msgbox "Internet Explorerが閉じられました。"
	Set objIE = Nothing
	WScript.Quit() 'スクリプトの終了
End Sub

Sub IE11_OnStatusBar(StatusBar)
	msgbox "OnStatusBar"
End Sub

Sub IE11_OnTheaterMode(TheaterMode)
	msgbox "OnTheaterMode"
End Sub

Sub IE11_OnToolBar(ToolBar)
	msgbox "OnToolBar"
End Sub

Sub IE11_OnVisible(vVisible)
	msgbox "OnVisible"
End Sub

Sub IE11_PrintTemplateInstantiation(browser)
	msgbox "PrintTemplateInstantiation"
End Sub

Sub IE11_PrintTemplateTeardown(browser)
	msgbox "PrintTemplateTeardown"
End Sub

Sub IE11_PrivacyImpactedStateChange(bPrivacyImpacted)
	msgbox "PrivacyImpactedStateChange"
End Sub

Sub IE11_PropertyChange(sProperty)
	msgbox "PropertyChange"
End Sub

Sub IE11_RedirectXDomainBlocked(browser, url, RedirectURL, Frame, StatusCode)
	msgbox "RedirectXDomainBlocked"
End Sub

Sub IE11_SetPhishingFilterStatus(PhishingFilterStatus)
	msgbox "SetPhishingFilterStatus"
End Sub

Sub IE11_SetSecureLockIcon(SecureLockIcon)
	msgbox "SetSecureLockIcon"
End Sub

Sub IE11_StatusTextChange(sText )
	msgbox "StatusTextChange"
End Sub

Sub IE11_ThirdPartyUrlBlocked(URL, dwCount)
	msgbox "ThirdPartyUrlBlocked"
End Sub

Sub IE11_TitleChange(sText)
	msgbox "TitleChange"
End Sub

Sub IE11_UpdatePageStatus()
	msgbox "UpdatePageStatus"
End Sub

Sub IE11_WindowActivate()
	msgbox "WindowActivate"
End Sub

Sub IE11_WindowMove()
	msgbox "WindowMove"
End Sub

Sub IE11_WindowResize()
	msgbox "WindowResize"
End Sub

Sub IE11_WindowStateChanged(dwFlags, dwValidFlagsMask)
	msgbox "WindowStateChanged"
End Sub





以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?