sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #47089
Re: [Question #668667]: Return the dimensions of an image that's just been found
Question #668667 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/668667
Status: Answered => Open
arminius is still having a problem:
This is my current working test.
import shutil
import os
screenshotsDir = "C:\Users\ADDRESS_PATH\1stloop"
wait(1)
mySimilarity = 0.90
Reg = Region(413,242,519,366)
search = True
while search:
if Reg.exists(Pattern(Pattern("1525655012965.png").targetOffset(-1,-19)).similar(mySimilarity)):
m = (Reg.getLastMatch())
Xis = m.getX()
Yis = m.getY()
Wis = m.getW()
His = m.getH()
print m.getX(), m.getY(), m.getW(), m.getH()
print(Xis)
print(Yis)
print(Wis)
print(His)
img = capture(Xis, Yis, Wis, His)
shutil.move(img, os.path.join(screenshotsDir, "\First_image_used.png"))
hover(Reg.getLastMatch())
search = False
wait(5)
print('Finished')
The program executes without any bugs, goes right to the end, but the
First_image_used.png is not being changed at all.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.