4
我想讓特定IE實例的子節點看看是否有彈出窗口。EnumChildWindows不能在pywin32中工作
我製作了一個彈出窗口的.html頁面。彈出窗口的標題是「網頁留言」,因爲它始終適用於此版本的IE。
我可以從子窗口父:
>>> child_handle = 15208472
>>> win32gui.GetWindowText(child_handle)
'Message from webpage'
>>> win32gui.GetParent(child_handle)
33230502
>>> parent_handle = 33230502
>>> win32gui.GetWindowText(parent_handle)
'pop-up example - Windows Internet Explorer'
然而,似乎我無法從母公司獲得的子窗口:
>>> def all_ok(hwnd, param): return True
>>> win32.EnumChildWindows(parent_handle, all_ok, None)
>>>
這是爲什麼?
爲什麼「我似乎無法」 - >「看起來我不行」? – Claudiu