Skip to content

Documentation: No syntax given for rect tuples. #25

Closed
@tdnzr

Description

@tdnzr

Hey there, thanks for this module! I'm trying to automate some small GUI stuff, and autopy seems like a nice tool for the job.

I had one small issue: I wanted to search part of the screen for a GUI element and tried to provide a rectangle. But the https://www.autopy.org/documentation/api-reference/bitmap.html doesn't explain anywhere that the rect tuples are meant to be ((x, y), (width, height)). I thought the two tuples were meant to refer to the top-left and bottom-right corner of the rectangle, and promptly got an error:

"thread '' panicked at 'invalid rect: ((857, 1000), (1063, 1055)) outside of image bounds (((0, 0), (1920, 1200)))', C:\Users\appveyor.cargo\registry\src\github.com-1ecc6299db9ec823\autopilot-0.1.8\src\bitmap.rs:310:13"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions