|
Post by huoldz on Jun 26, 2019 2:57:07 GMT
I'm sure my order is easy I want to know when I want to check the picture match how to write a condition that gives me two options for example If there is a match than do so else do so like this
How to set a time for a loop
Something else Can you give me -Language Reference -functions -conditions -action
|
|
|
Post by AnkuLua on Jun 26, 2019 7:25:56 GMT
|
|
|
Post by Exilereven on Jun 26, 2019 12:42:32 GMT
I'm sure my order is easy I want to know when I want to check the picture match how to write a condition that gives me two options for example If there is a match than do so else do so like this
How to set a time for a loop
Something else Can you give me -Language Reference -functions -conditions -action
This may help. ankulua.boards.net/thread/1004/user-guide-basic-script-setup
|
|
|
Post by huoldz on Jun 27, 2019 16:07:24 GMT
Thanks for your reply and help i have another question this cod
reg1 = Region(125, 726, 445, 324) if (reg1:exists("2.png")) then mgme = regionFindAllNoFindException(reg1, "2.png") for i= 1,#mgme,1 do gme = mgme:getTarget() click(gme:offset(0, 100)) end end How do I keep reg1:exists("2.png") and regionFindAllNoFindException(reg1, "2.png") searching for a certain time?
|
|
|
Post by Exilereven on Jun 27, 2019 16:53:12 GMT
Thanks for your reply and help i have another question this cod reg1 = Region(125, 726, 445, 324) if (reg1:exists("2.png")) then mgme = regionFindAllNoFindException(reg1, "2.png") for i= 1,#mgme,1 do gme = mgme :getTarget() click(gme:offset(0, 100)) end end How do I keep reg1:exists("2.png") and regionFindAllNoFindException(reg1, "2.png") searching for a certain time?
-- timer for loop, where you want time to begin local timer = Timer() while (timer:check() < 60) do reg1 = Region(125, 726, 445, 324) if (reg1:exists("2.png")) then mgme = regionFindAllNoFindException(reg1, "2.png") for i= 1,#mgme,1 do gme = mgme:getTarget() click(gme:offset(0, 100)) end end ------^^^^^^^^^^^^^^^^ this will repeat entire chunk until the timer has reached 60 seconds. you can play around and figure out where you want it to loop or check time. timer:set() -- will reset timer after looping for a min end -- you can also set each od these to look for the image for a soecified time. (reg1:exists("2.png", 3)) -- search 3 seconds regionFindAllNoFindException(reg1, "2.png", 6) -- search 6 seconds
|
|
|
Post by huoldz on Jun 27, 2019 17:35:53 GMT
thank you so much
|
|
|
Post by Exilereven on Jun 28, 2019 0:56:42 GMT
|
|