← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #273398]: Is these a way to obtain variable data types in IDE Sikuli

 

Question #273398 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/273398

    Status: Answered => Open

can is still having a problem:
Thanks RaiMan for your answer.
I try these ways, these ways are quite good.

Q1:
I would like to deal with the return values of these functions (find(),exists(),wait()), and what are their data types? I find that they don't seem to be Region and Pattern.

#my code1
pic = ["a.png",Pattern("b.png").exact(),Pattern("c.png").similar(0.90),Pattern("d.png").similar(0.01)]
newpic1 = exists(pic[0])
print isinstance(newpic1,Region)

>>The results show False


Q2:
I find that the return value of the image thumbnail modified similarity and the return value of the default similarity image thumbnail are different.
Whether there is a way to deal with this in a unified format

#my code2
pic = ["a.png",Pattern("b.png").exact(),Pattern("c.png").similar(0.90),Pattern("d.png").similar(0.01)]
print isinstance(pic[0],Pattern)
>>The results show False

print isinstance(pic[1],Pattern)
>>The results show True

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.