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?

vbsの作法 その87

Posted at

概要

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

練習問題

IE11で、タイトルとディスクリプションを取得せよ。

サンプルコード


Dim ws
Set ws = WScript.CreateObject("WScript.Shell")
Dim objIE
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
objIE.Navigate "https://auctions.yahoo.co.jp"
ws.AppActivate("Internet Explorer")

Do While objIE.ReadyState <> 4 Or objIE.Busy = True
    WScript.Sleep 100
Loop

For Each elm In objIE.Document.getElementsByTagName("meta")
	If elm.name = "description" then
		WScript.Echo "Title: " & objIE.Document.Title
		WScript.Echo "description: " & elm.Content
	End If
Next

objIE.Quit
Set objIE = Nothing




以上

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?