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

Bug #1288796 reported by RaiMan
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
High
obiwan-92

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
        sleep(1)
        for ch in event.changes:
                ch.highlight() # turn off the highlights
ns = getNumberScreens()
popup("Number of screens = " + str(ns))
scr=Screen(0)
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)

r.stopObserver()
popup("Done looking")

obiwan-92 (obiwan-92)
Changed in sikuli:
status: New → Incomplete
Revision history for this message
obiwan-92 (obiwan-92) wrote :

Hello.

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)

Regards.

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)
Changed in sikuli:
assignee: nobody → obiwan-92 (obiwan-92)
RaiMan (raimund-hocke)
Changed in sikuli:
status: Confirmed → Fix Committed
importance: Undecided → High
assignee: obiwan-92 (obiwan-92) → RaiMan (raimund-hocke)
milestone: none → 1.1.0
Revision history for this message
obiwan-92 (obiwan-92) wrote :

Hello.

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.

Revision history for this message
RaiMan (raimund-hocke) wrote :

@obiwan
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)
Changed in sikuli:
status: Fix Committed → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.