← Back to team overview

sikuli-driver team mailing list archive

[Bug 1288796] Re: [1.0.1] MultiMonitor: negative Y value for second monitor might muss up monitor config

 

The code :
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)

return :
Region : R[-1440,-900 1440x900]@S(1)[-1440,-900 1440x900] E:Y, T:3,0
Event : ChangeEvent on R[-1440,-900 1440x900]@S(1)[-1440,-900 1440x900] E:Y, T:3,0 | 1 changes
Changes : M[-1404,-845 697x359]@S(S(0)[0,0 1366x768]) S:-1,00 Center:-1056,-666
[log] highlight M[-1404,-845 697x359]@S(S(0)[0,0 1366x768]) S:-1,00 Center:-1056,-666 for 3.0 secs

The highlight picture inside the red rectangle is coming from the
Screen(0)

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1288796

Title:
  [1.0.1] MultiMonitor: negative Y value for second monitor might muss
  up monitor config

Status in Sikuli:
  Incomplete

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")

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1288796/+subscriptions


References