Pergunta

I'm writing a python GUI for a downloader in windows. Currently I can wine that application in some way to download things from the website. I want to write a GUI which calls the downloader so that it's easier for myself to use it.

So one important thing for my GUI is to display the progress. When the downloader is running using wine, if I move the cursor onto the icon, it will display progress in percentage. That's the number I want for my code. So is there any way that I can get that information through some kind of API of wine?

Foi útil?

Solução

So you're controlling a Windows downloader running in Wine. Is this downloader graphical? Is this icon in a window or what?

Assuming yes to both:

  • If your Python application is running natively in *nix (not Wine), the only sure way is to take a screenshot around the cursor and use Optical Character Recognition to recognize the numbers in the image :-). This is because under Wine, not every Windows window is an X11 window.
  • If you are running your application on a Windows version of Python installed in Wine, you're in luck. Tooltips are just windows - you should be able to iterate over all windows in the downloader, and get the contained text.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top