[1.0.1] Windows: Bug recognition dual monitor --- fixed in 1.1.0 final version

Asked by Edern

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 !

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

what version of Sikuli?

with version 1.1.0 we have a regression currently to not working correctly anymore in some special situations.
This is going to be fixed soon.

All previous versions have different problems with multi monitor situations.

Revision history for this message
Edern (edern-lehyaric) said :
#2

I'm curently using version 1.0.1 on a Windows 8.1 OS

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

Yep, then you have to wait until it is fixed in 1.1.0 and then switch to 1.1.0

Sorry for the inconvenience.

Revision history for this message
Edern (edern-lehyaric) said :
#4

Thanks RaiMan, that solved my question.