Drag and drop with Sikuli

╄→гoц情女王★ 提交于 2019-12-04 07:03:23
RaiMan

only to say hello here - an alternative coding:

dragDrop(t, t.offset(Location(100, 100)))

To quote RaiMan (raimund-hocke):

the first parameter is a Match object, which is ok. the second prameter must be of type PSMRL too (see docs: Pattern/Image, String, Match, Region or Location)

dragDrop(t, Location(t.x + 100, t.y + 100))

I use this code to drag an image down to a given location:

image1 = ("image1.png")
imageLoc = find(image1)
dragDrop(imageLoc, Location(imageLoc.getX() + 100, imageLoc.getY() + 100))
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!