HOOK不会用
想用sell获得窗口对象,但貌似这样只能获取到主窗口的对象,有什么方法得到alert窗口对象然后取得消息框呢。
Set shell = CreateObject("Shell.Application")
For i = 0 To shell.Windows.Count - 1
Set window = shell.Windows(i)
title = Empty
On Error Resume Next
title = window.document.title
On Error Goto 0
If title <> Empty Then
If InStr("simple", title) = 1 Then
'主窗口的对象
msgbox(window)
Exit For
End If
End If
Next