sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #04599
Re: [Question #168052]: location class
Question #168052 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/168052
Status: Open => Answered
RaiMan proposed the following answer:
not sure, what you are trying to do.
Did you read the docs? (http://sikuli.org/docx/)
The class Location is already defined by Sikuli. It denotes a pixel on the screen.
You define a new location by:
myLoc = Location(some_x, some_y)
Some functions return a Location object:
upperLeftCorner = find("some-image.png").getTopLeft()
centerPixel = find("some-image.png").getCenter()
and other functions accept locations as input
mouseMove(myLoc)
hope it helps.
--- your error in your snippet:
when Python tries to run
Location(x,y) it says, that x is not defined yet.
When using variables, they have to be defined (e.g. x = 10) before used the fist time.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.