-1

Hi I need help to achieve this I have reviewed posts like this: How to read text from balloon popup window using python? But I have not been successful. I'm too new.

What I actually need is very similar to this: https://stackoverflow.com/questions/54353050/can-i-read-text-from-another-window-using-java#:~:text=interface%20User32%20extends,Native.toString(lParamStr))%3B%0A%20%7D

But in python

bukvaG
  • 597
  • 1
  • 4
  • 8
  • Did this link https://stackoverflow.com/questions/5862454/get-text-from-popup-window solve your problem? – abdou_dev Oct 05 '21 at 23:07
  • Yes, I saw it, Thank you very much. You can please move your comment to a response to be RESOLVED – Nowis F. R Oct 07 '21 at 23:50
  • See the answers in this post, may help you : [Get text from popup window](https://stackoverflow.com/questions/5862454/get-text-from-popup-window) – abdou_dev Oct 08 '21 at 08:29

1 Answers1

0

Try this :

import time
import win32gui

while True:
  window = win32gui.GetForegroundWindow()
  title = win32gui.GetWindowText(window)
  control = win32gui.FindWindowEx(window, 0, "static", None)
  print ' ', win32gui.GetWindowText(control)
  time.sleep(1)

Source : Get text from popup window

abdou_dev
  • 805
  • 1
  • 10
  • 28