如何在 Windows 10 上的 sikuli 中唯一标识图像。我遇到异常
我有两张相似的图像,一张图像位于屏幕的左侧,一张图像位于屏幕的右侧。我想单击左侧的图像。
我在代码中的想法是为左侧的图像创建一个区域,然后单击该区域上的图像,但是当我运行代码时,出现以下异常: 要搜索的图像 (650, 330) 大于要在 (1, 1) 中搜索的图像。
Region region = new Region(650,330,0,0);
Pattern element = region.find("myimage.png");
Screen screen = element.getScreen();
screen.doubleClick();
那么如何使用sikuli唯一识别左侧的图像呢?我使用的是sikuli版本2.0.5
I have two similar images, one image is on the left and one is on the right hand side of the screen. I want to click on the image on the left.
My idea in the code is to create a region for the image on the left then click the image on that region but when I run a code I get the following exception:
image to search (650, 330) is larger than image to search in (1, 1).
Region region = new Region(650,330,0,0);
Pattern element = region.find("myimage.png");
Screen screen = element.getScreen();
screen.doubleClick();
So how can I uniquely identify the image on the left using sikuli? I'm using sikuli version 2.0.5
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
定义一个区域:
new Region(x, y, w, h)
您的区域位于 (650, 330),宽度/高度为 0(内部为 1 像素)。
SikuliX 的 RaiMan
A Region is defined:
new Region(x, y, w, h)
Your Region is at (650, 330) with width/height 0 (which internally is 1 pixel).
RaiMan from SikuliX