标题: Type mismatch: 'Window'的问题 [打印本页] 作者: kevin_swpi 时间: 2009-10-8 11:01 标题: Type mismatch: 'Window'的问题 Msgbox shell_ReturnIEName_NEM
Public Function shell_ReturnIEName_NEM()
Set shell = CreateObject("Shell.Application")
set ie = createobject("internetexplorer.application")
Set shellWindows = shell.Windows()
For Each ie In shellWindows
If InStr(1,ie.FullName,"IEXPLORE.EXE",vbTextCompare) <> 0 then
shell_ReturnIEName_NEM = Window("hwnd:=" &ie.HWND).GetROProperty("Name")
End If
Next
Set shellWindows = Nothing
Set shell = Nothing
End Function
在VBSEdit上面 提示type mismatch
在qtp里面运行提示Cannot identify the object "[ Window ]" (of class Window). Verify that this object's properties match an object currently displayed in your application.......