← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #643462]: How to calculate the exact center of a computer screen?

 

Question #643462 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/643462

    Status: Open => Answered

masuo proposed the following answer:
[How to move mouse the center of the screen]
mouseMove(SCREEN.getCenter()) or mouseMove(Screen(0).getCenter())

[How to check the value]
print SCREEN.getCenter() #Location
print Screen(0).getCenter()
print SCREEN.getCenter().getX() #Coordinate X
print SCREEN.getCenter().getY() #Coordinate Y

[about getCenter() and Screen]
http://sikulix-2014.readthedocs.io/en/latest/region.html?highlight=getcenter#Region.getCenter
http://sikulix-2014.readthedocs.io/en/latest/screen.html?highlight=SCREEN

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.