-
Notifications
You must be signed in to change notification settings - Fork 0
/
BrowserTapName
40 lines (28 loc) · 979 Bytes
/
BrowserTapName
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Set obBrowser=Description.Create
obBrowser("micclass").value="Browser"
Set objCount=Desktop.ChildObjects(obBrowser)
For i=0 to objCount.count-1
BrowserName=objCount(i).getroproperty("name")
MsgBox BrowserName
Next
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Set oBrowser=Description.Create
oBrowser("micclass").Value="Browser"
Set oBrowser=Desktop.ChildObjects(oBrowser)
totalcount = oBrowser.Count-1
For i=0 to totalcount
If Browser("micclass:=Browser", "index:="&i).Exist(0) Then
ohwnd= Browser("micclass:=Browser", "index:=" & i).GetROProperty("hwnd")
name = Browser("hwnd:="&ohwnd).GetROProperty("title")
Set oBrowser=Browser("hwnd:="&ohwnd)
Set oPage=Description.Create
oPage("micclass").Value="Page"
Set oPage=Browser("hwnd:="&ohwnd).ChildObjects(oPage)
For n=0 to oPage.Count-1
If oPage(n).Exist(0) Then
oBrowser.Close
Exit For
End If
Next
End If
Next