fork download
  1. Dim objie, Reg, ie
  2. 'const searchKey = "IEのタブタイトル"
  3. const searchKey = "https://XXXX/XXXXXX/XXXXXX/"
  4. 'タブタイトルまたはタブURLを指定(片方をコメントアウト)して下さい
  5. Set objie = Nothing
  6. Set Reg = CreateObject("VBScript.RegExp")
  7. Reg.Pattern = ".*" & searchKey & ".*"
  8. On Error Resume Next
  9. For Each obj In CreateObject("Shell.Application").Windows
  10. If TypeName(obj.Document) = "HTMLDocument" Then
  11. If Reg.Test(obj.LocationName) Or Reg.Test(obj.LocationURL) Then
  12. Set objie = obj
  13. End If
  14. End If
  15. Next
  16. On Error GoTo 0
  17. Set Reg = Nothing
  18. If objie Is Nothing Then
  19. MsgBox "指定のieが見つかりませんでした"
  20. Else
  21. MsgBox "指定のieを見つけました"
  22. Set ie = objie
  23. End If
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty