User clicks as input

Asked by Christos on 2017-12-08

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:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2017-12-08
Last query:
2017-12-08
Last reply:
2017-12-08
Best RaiMan (raimund-hocke) said : #1

selectRegion()
See the docs

Christos (chris023r) said : #2

Thanks RaiMan, that solved my question.