|
Post by zomry1 on May 10, 2017 15:16:50 GMT
Hi ! I am new in ankulua and in lua at all, I am working on a project and I try to get the locations of the findAll of an image, how I can do that?
Thanks in advance!
|
|
|
Post by AnkuLua on May 10, 2017 15:47:49 GMT
test1 = findAll("target.png"))
for i, m in ipairs(test1) do location = m:getTarget() end
|
|
|
Post by crossa on Feb 5, 2021 3:02:58 GMT
test1 = findAll("target.png")) for i, m in ipairs(test1) do location = m:getTarget() end I just checked that 1. test1 = findAll("target.png") print(test1) 2. test1 = region:findAll("target.png") print(test1) have different result. 1. return table. 2. return data insert table. why ? it supposed to be same results right ?
|
|
|
Post by crossa on Feb 5, 2021 3:19:57 GMT
yes is supported! can you share a piece of your code using that method? I am changing my question.. I have edited the reply above. Here is my piece of code.
mediumAnomaly = Pattern("MediumAnomaly.png"):similar(0.6) overviewRegion = Region(977, 2, 185, 389)
all = overviewRegion:findAll(anomalyType)
for i, data in ipairs(all) do location = data:getTarget() click(location) end
Basically I want to add region on findAll method. the error is (table expected, got userData) so I do this mediumAnomaly = Pattern("MediumAnomaly.png"):similar(0.6) overviewRegion = Region(977, 2, 185, 389)
all = overviewRegion:findAll(mediumAnomaly)
totalAll = {} table.insert(totalAll, all)
for i, data in ipairs(totalAll) do location = data:getTarget() click(location) end and got error (No Such Method) in function getTarget()
|
|
|
Post by Mercobots on Feb 5, 2021 3:28:21 GMT
yes is supported! can you share a piece of your code using that method? I am changing my question.. I have edited the reply above. Here is my piece of code.
mediumAnomaly = Pattern("MediumAnomaly.png"):similar(0.6) overviewRegion = Region(977, 2, 185, 389)
all = overviewRegion:findAll(anomalyType)
for i, data in ipairs(all) do location = data:getTarget() click(location) end
Basically I want to add region on findAll method. ok no problem just use regionFindAllNoFindException(region, PS) btw you have here a full ankulua api ankulua.boards.net/thread/181/api-quick-reference
|
|
|
Post by crossa on Feb 5, 2021 3:34:17 GMT
I am changing my question.. I have edited the reply above. Here is my piece of code.
mediumAnomaly = Pattern("MediumAnomaly.png"):similar(0.6) overviewRegion = Region(977, 2, 185, 389)
all = overviewRegion:findAll(anomalyType)
for i, data in ipairs(all) do location = data:getTarget() click(location) end
Basically I want to add region on findAll method. ok no problem just use regionFindAllNoFindException(region, PS) btw you have here a full ankulua api ankulua.boards.net/thread/181/api-quick-referencewhoops...its work.. also appreciate the link for full ankulua API Thank you very much.
|
|