How to Click on an Area of the Screen and Ignore Anything Outside

How can I create a bot that only scans a specific rectangular area on the screen and takes action in that area only when it finds predetermined images that I want it to click and perform an action on?

Hey @Rafael,

I don’t know if I understood correctly, but in the find method, you can configure a specific region that will be used to search for an element, for example:

bot = DesktopBot()

if bot.find(label="element", matching=0.97, waiting_time=10000, x=500, y=100, width=1000, height=800):
    bot.click()

In the documentation you can see more details about the parameters: Python - BotCity - Python RPA

1 Like