Get text from popup window

前端 未结 2 994
谎友^
谎友^ 2020-12-28 22:28

I\'m trying to read the text from a popup window.

\"errors\"

The title is always the same. I\'ve man

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-28 22:51

    I don't have access to the framework or the error dialog you are using, so I can only say in general what you want.

    You need the FindWindowEx function, and use it to find a control whose class name is 'static' (or whatever the class name of the control is). I imagine this would be the line:

    control = win32gui.FindWindowEx(window, 0, "Static", 0)
    

    That returns the handle to the control, and you can then use GetWindowText on that to get the text.

提交回复
热议问题