-2

I'm trying to find a way to make my automation bot faster I realized that by searching only within the application window instead of the whole screen would give it a speed post how can i do it

1 Answers1

0

You need to give us some code or what you already tried.

But you could use pywinauto package to use the application you want. For more details please check the How does it work.

You can get all applications open from Desktop function as:

from pywinauto import Desktop

windows = Desktop(backend="uia").windows()
window = [w.window_text() for w in windows]

So if you print(window) you will have for example:

['Zoom', 'python - how do i use Pyautogui locate on screen function within only one application window instead of the whole screen - Stack Overflow', 'Dictations - OneNote']
Guilherme Matheus
  • 573
  • 10
  • 30