RPA-Python
RPA-Python copied to clipboard
"Speeding up" the search for objects on the screen.
Hello! Please tell me if it is possible to speed up the process of "searching for an object" (for example, buttons) by dividing the screen into areas. For example, I know approximately where the object I need may be located - the "Start button" in Windows (classically, the lower-left corner). I can only look at the bottom left of the screen (a quarter of the screen) or split the screen into more search areas. It is logical to assume that the search area and time can be reduced by localizing the area. Is it possible to implement this idea?
what about using coordinates?
what about using coordinates?
What if we know the approximate location, but not the exact location of the object? I propose to make a binding to a specific area of the screen, without using physical coordinates. The example with the Start button (Windows) was a bit incorrect. Let's take another example - a small dialog box that is located in the center of the screen, which has the "Ok" and "Cancel" buttons. If we split the screen into 9 areas (3 x 3), and when searching for an object, use only the area [2, 2] to search for an object (for example, the "Cancel" button). This can significantly speed up the entire operation.
Hi @debugger1979 that is a great idea, but not doable using the package. You can consider using vision() function to make direct custom SikuliX commands. I'm not sure even if using that is doable. You can check the whole SikuliX API here https://sikulix-2014.readthedocs.io
What @juanyacovino77 might be the fastest way if the position is always the same. Also, you can run with r.init(turbo_mode = True) to save some time for the mouse cursor to move to the target position before clicking. It will directly teleport to that position.
Closing issue for now but will look out for your reply