User clicks as input

Asked by Christos

I am searching for half an hour, but I can't find anything relevant.

variable = int(input("Give me a number"))

The above line, opens a window where the user is asked to input an integer.

What I need is a similar method but instead of an integer, I want Sikuli to expect for the user to click or indicate a region.
Then :
if the user clicked, I want to capture the x,y coordinates and store them to a list.
if the user indicated a region, store that region to a list.

I don't need both methods. One of them is more than enough.

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

selectRegion()
See the docs

Revision history for this message
Christos (chris023r) said :
#2

Thanks RaiMan, that solved my question.