getMouseLocation() poorly documented.

Asked by Eric Beilman

The way the documentation words it, you can just use "myvar = getMouseLocation()" and it will work. This may just be my lack of familiarity with python, but the documentation doesn't really mention that in order to use getMouseLocation(), you have to actually call it like this: "myvar = Env.getMouseLocation()". Since this IDE is an extension of python, to make things easier to read and write perhaps it could rewrite getMouseLocation() into Env.getMouseLocation() behind the scenes and leave class calls completely out of the script language?

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
Eric Beilman (delerium76) said :
#1

After looking at the source, it seems there's a python wrapper for each Jython class (Region, Location, Match, etc) except one for Env. I don't know enough to write one myself, but that might be the culprit.

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

- wrapped on Python level:
It seems so, that everything is wrapped in Python. But that is not really true. even inside the classes, some methods are not wrapped or miss some features. So feel free to report a bug, since the question/answer input is not evaluated towards development needs.

- the documentation tells you at http://sikuli.org/trac/wiki/reference-0.10#getMouseLocation:
getMouseLocation()
Usage: Env.getMouseLocation() (a static method of Class Env).
returns: the current position of the mouse cursor as an object of Class Location.

I think the words are clear.

Can you help with this problem?

Provide an answer of your own, or ask Eric Beilman for more information if necessary.

To post a message you must log in.