|
Post by AutoBOT on Jun 12, 2017 18:42:05 GMT
title
my script is something like this
picture = (Pattern("pic.png"):similar(imgSim))
existsClick(picture)
and it just won't work. only if I put it like this similar(0.8) then it will works. and the other thing that works is if I set it like this
Setting:set("MinSimilarity", imgSim) picture = ("pic.png")
existsClick (picture)
|
|
|
Post by Mercobots on Jun 12, 2017 21:59:28 GMT
title my script is something like this picture = (Pattern("pic.png"):similar(imgSim)) existsClick(picture) and it just won't work. only if I put it like this similar(0.8) then it will works. and the other thing that works is if I set it like this Setting:set("MinSimilarity", imgSim) picture = ("pic.png") existsClick (picture) hi maybe your imgSim is string type try picture = (Pattern("pic.png"):similar(tonumber(imgSim)))
or imgSim = 0.8
--dont do this
imgSim = "0.8"
|
|
|
Post by AutoBOT on Jun 13, 2017 4:03:55 GMT
title my script is something like this picture = (Pattern("pic.png"):similar(imgSim)) existsClick(picture) and it just won't work. only if I put it like this similar(0.8) then it will works. and the other thing that works is if I set it like this Setting:set("MinSimilarity", imgSim) picture = ("pic.png") existsClick (picture) hi maybe your imgSim is string type try picture = (Pattern("pic.png"):similar(tonumber(imgSim)))
or imgSim = 0.8
--dont do this
imgSim = "0.8"
pretty sure it's not. because I use addEditNumber. I even manage to do a simple multiply. imgSim = imgSim * 0.01 edit: okay. I found the problem, it's because somehow if I set it to similarity 0.7 it will read my other IF(pic), that makes the whole function broke. but If I Increase it to 0.75 it works fine
|
|