sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #32345
[Question #266846]: Bug recognition dual monitor
New question #266846 on Sikuli:
https://answers.launchpad.net/sikuli/+question/266846
Hello, I can't make sikuli work properly with my second screen.
I have a laptot with my main screen on its right but every time i try to hover onto the laptop's screen, i have many issues.
for example with this code :
scr = Screen(1) #secondary
r = scr.selectRegion("Select region")
hover(r)
I will have the content of the right (main) screen frozen in the left screen (the interface of region selection will be on the left alright, but with the right screen's content), and then the mouse will hover to the right screen in the center of the region i selected.
also, if i try something like :
hover(Location(-500,500))
Instead of going to the second screen, it'll just 'loop' on the main, and go to (1920 - 500 ; 500), => for 1920 < x < -1920 i'll got a NullPointerException, but within this range, the mouse 'll just travel the screen twice (from -1920 to 0, and 0 to 1920).
I don't really now what i'm missing ,so i'll throw some intel hoping it'll be enough:
java.awt.Rectangle[x=0,y=0,width=1920,height=1080] #Screen(0).getBounds()
java.awt.Rectangle[x=-1920,y=0,width=1920,height=1080] #Screen(1).getBounds()
2 #getNumberScreens()
Yet, if i ask the location of the mouse when i'm on the second screen, it'll answer correctly about the position. But if i ask to go to that position the mouse will go to the main screen
x = Env.getMouseLocation().getX()
y = Env.getMouseLocation().getY()
sleep(1)
hover(Location(x,y))
Thanks in advance for your help !
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.