How to save the location of the result of click

Asked by Alex

Hello,
I want to save the x and y location of click's result as variable for further computing.
What function should I do?
I try to use
result=find(ps)
x1=result.getX()
y1=result.getY()
But it returns the upper left point. I want the center point.
please help me!
Thanks

Question information

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

result=find(ps).getCenter()
x1=result.getX()
y1=result.getY()

looking at the docs (http://sikuli.org/docx) would have helped ;-)

Revision history for this message
Alex (hpcalex) said :
#2

Thanks RaiMan, that solved my question.