Look for images only in a specific Windows process

How do I set botcity’s computer vision to look for images only in a specific Windows process (like notepad.exe)? Sometimes it make clicks outside the area of ​​interest, on the desktop or task bar.

@dimitriusss you could try something like this:

# Connect to the windows app
bot.connect_to_app(best_match="Notepad", timeout=30000)

# Get the app main window
main_window = bot.app.top_window()

# Get the window RECT
window_rect = main_window.client_rect()

x, y, width, height = window_rect.left, window_rect.top, window_rect.width(), window_rect.height()

# Search using the area from the window
if not bot.find("YOUR_IMAGE_LABEL", matching=0.97, waiting_time=10000, x=x, y=y, width=width, height=height):