bdbd
New Member
Posts: 24
|
Post by bdbd on Dec 6, 2017 12:38:40 GMT
If there is a 11.png on the screen, click 100.png and do ~~~~ If there is a 22.png on the screen, click 200.png and do ~~~~ it means that searching image and clicking image are different. if (exists("11.png", 1)) then existsClick("100.png") toast(there is 11 png) end if (exists("22.png", 1)) then existsClick("200.png") toast(there is 22 png) end but it always works! eventhough there is no 11.png or 22.png always click 100.png and 200.png whats wrong with my code? and i want make one more thing. Count Stars.png and do something. if there is 1 stars.png do ~~~~ if there is 2 stars.png do ~~~~ then local stars=findAll(stars.png) like this..?? please helpe me if i solve this, i can apply to many script.
|
|
|
Post by Mercobots on Dec 6, 2017 15:41:12 GMT
try this to see where the error comes
if (exists("11.png", 1)) then getLastMatch():highlight("11") existsClick("100.png") end
if (exists("22.png", 1)) then getLastMatch():highlight("22") existsClick("200.png") end
local stars = findAllNoFindException("stars.png")
if #stars > 0 then for i, star in ipairs(stars) do star:highlight(tostring(i)) end else toast("stars not found") end
|
|
bdbd
New Member
Posts: 24
|
Post by bdbd on Dec 6, 2017 20:01:16 GMT
WOW.. there are some trial and error but solved! thank you.
I will ask another question later. enough to study myself!
|
|