← Back to team overview

sikuli-driver team mailing list archive

[Bug 1532898] [NEW] [request] Find(img) and DragDrop the Screen to Middle

 

Public bug reported:

 I constantly use Find(image) the get region around the image then do
DragDrop the Screen to Middle.  It would be nice to have a method where
you find the image on screen and drag screen to middle.  I constantly
run into problems where myregion and dragDrop is outside screen space
where script will stop working properly afterwards.

This code below finds the image and drag and drop to right.

  icons=findAll(Pattern("1449539836856.png").similar(0.65))
  sorted_icons = sorted(icons, key=by_x)
  for t in sorted_icons:
    t.highlight(2)
    wait(1)
    myregion=Region(t.x,t.y,200,200)
    myregion.highlight(2,"green")
    dragDrop(t, t.offset(Location(-200,0)))

** Affects: sikuli
     Importance: Undecided
         Status: New


** Tags: dragdrop scroll

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

Title:
  [request] Find(img) and DragDrop the Screen to Middle

Status in Sikuli:
  New

Bug description:
   I constantly use Find(image) the get region around the image then do
  DragDrop the Screen to Middle.  It would be nice to have a method
  where you find the image on screen and drag screen to middle.  I
  constantly run into problems where myregion and dragDrop is outside
  screen space where script will stop working properly afterwards.

  This code below finds the image and drag and drop to right.

    icons=findAll(Pattern("1449539836856.png").similar(0.65))
    sorted_icons = sorted(icons, key=by_x)
    for t in sorted_icons:
      t.highlight(2)
      wait(1)
      myregion=Region(t.x,t.y,200,200)
      myregion.highlight(2,"green")
      dragDrop(t, t.offset(Location(-200,0)))

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


Follow ups