[1.0.1] MultiMonitor: Highlight doesn't work correctly with several screens

Bug #1288796 reported by RaiMan on 2014-03-06
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

Hey, I'm pretty new to Sikuli but am struggling with this multiple monitor thing. I've looked through other posts and didn't quite find an answer. I'm running Windows 7 (maybe that's the problem!) and have a laptop with an external monitor. My external monitor is my primary desktop with the Start bar at the bottom and my laptop sits to the left. When I run the code below, it tells me that I have 2 monitors, but I can't get it to select a region over on my laptop screen. And in the line "scr=Screen(0)" the word Screen is red which tells me that it doesn't recognize that class name or something (I'm using the IDE by the way). I've also tried Screen(1) and Screen(2) with no change. It allows me to select a region on my primary external monitor but never on my laptop screen:

def changed(event):
        #popup("something changed ")
        for ch in event.changes:
                ch.highlight() # highlight all changes
        for ch in event.changes:
                ch.highlight() # turn off the highlights
ns = getNumberScreens()
popup("Number of screens = " + str(ns))
r = scr.selectRegion("Please select the region")
    # any change in r larger than 50 pixels would trigger the changed function
r.onChange(50, changed)
r.observe(5, background=False)

popup("Done looking")

obiwan-92 (obiwan-92) on 2014-03-12
Changed in sikuli:
status: New → Incomplete
obiwan-92 (obiwan-92) wrote :


Resume :

When I use the following code, the highlight area show an image coming from the screen 0 when it should be an image from the screen 1.

r = Region(Screen(1).getBounds())
print "Region : ", r
def changed(event):
    print "Event : ", event
    for ch in event.changes:
        print "Changes : ", ch
        ch.highlight(3) # highlight all changes for 3 sec.
r.onChange(50, changed)
r.observe(10, background=False)


summary: - [1.0.1] MultiMonitor: negative Y value for second monitor might muss up
- monitor config
+ [1.0.1] MultiMonitor: Highlight doesn't work correctly with several
+ screens
Changed in sikuli:
status: Incomplete → Confirmed
obiwan-92 (obiwan-92) on 2014-03-19
Changed in sikuli:
assignee: nobody → obiwan-92 (obiwan-92)
RaiMan (raimund-hocke) on 2014-03-19
Changed in sikuli:
status: Confirmed → Fix Committed
importance: Undecided → High
assignee: obiwan-92 (obiwan-92) → RaiMan (raimund-hocke)
milestone: none → 1.1.0
obiwan-92 (obiwan-92) wrote :


You're not funny, I would try to solve this problem, this Week-End. :-P

Like always, thanks a lot RaiMan !!!

I'm curious, where was the problem ?

Best regards.

RaiMan (raimund-hocke) wrote :

Please do it.
I do not have much time in March.

Changed in sikuli:
assignee: RaiMan (raimund-hocke) → obiwan-92 (obiwan-92)
obiwan-92 (obiwan-92) on 2014-03-21
Changed in sikuli:
status: Fix Committed → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions