How to adjust click position in image (e.g., check box)

Asked by Joe Chou

I have problem to adjust the click position within a extended image, a check box with its label. Be default, the click spot is in the center of the image. In this case, the click spot is the check box, which is on the far right. I noticed Sikuli seems to have an attribute (forgot the name at the moment) to do that. Is there a sample script to show how it can be done? Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

the usage is

Pattern("some_image.png").targetOffset(x,y)

instead of only

"some_image.png"

In the IDE click on the image thumbnail and you can adjust this in the preview tab target offset.

Revision history for this message
Joe Chou (joechou2009) said :
#2

Thanks for the answer, and I'll give it a try when I have a chance.

> To: <email address hidden>
> From: <email address hidden>
> Subject: Re: [Question #208938]: How to adjust click position in image (e.g., check box)
> Date: Tue, 18 Sep 2012 20:15:55 +0000
>
> Your question #208938 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/208938
>
> Status: Open => Answered
>
> RaiMan proposed the following answer:
> the usage is
>
> Pattern("some_image.png").targetOffset(x,y)
>
> instead of only
>
> "some_image.png"
>
> In the IDE click on the image thumbnail and you can adjust this in the
> preview tab target offset.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/sikuli/+question/208938/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sikuli/+question/208938
>
> You received this question notification because you asked the question.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

to keep it

Can you help with this problem?

Provide an answer of your own, or ask Joe Chou for more information if necessary.

To post a message you must log in.