Kako
Contributors
Posts: 105
|
Post by Kako on Jun 20, 2016 13:24:19 GMT
Next to waitVanish() and waitClick(), could you add clickVanish(); a function that does a continueClick until the pattern cannot be found any longer? Thanks in advance!
|
|
|
Post by AnkuLua on Jun 20, 2016 15:57:36 GMT
Next to waitVanish() and waitClick(), could you add clickVanish(); a function that does a continueClick until the pattern cannot be found any longer? Thanks in advance! You can use following method. It does exactly the same as clickVanish() while (existsClick("target.png")) do end
|
|
Kako
Contributors
Posts: 105
|
Post by Kako on Jun 20, 2016 18:10:38 GMT
Next to waitVanish() and waitClick(), could you add clickVanish(); a function that does a continueClick until the pattern cannot be found any longer? Thanks in advance! You can use following method. It does exactly the same as clickVanish() while (existsClick("target.png")) do end Thanks!
|
|
|
Post by Devn00b on Jun 26, 2016 7:38:45 GMT
hello..
they have no waitDoubleClick(PSMRL)? and how toast(String)set custom location without backgroud and change color?
my simple test code
round=0 while (true) do round=round+1 toast("rounds: ",round) end
how i put this toast(String)output on left top sceen in color red?
|
|
|
Post by AnkuLua on Jun 26, 2016 7:42:21 GMT
No. You can't change the location and color of toast.
waitDoubleClick(PSRML) is equal to wait(PSMRL) doubleClick(getLastMatch())
|
|
Kako
Contributors
Posts: 105
|
Post by Kako on Jun 26, 2016 8:36:37 GMT
hello.. how i put this toast(String)output on left top sceen in color red? You could look for an Xposed module to change the location and color of the toast Of course, this will apply to all toasts.
|
|
maomi
New Member
Posts: 4
|
Post by maomi on Jul 29, 2016 16:00:25 GMT
Hi,
How do we use regions? I'm using
But this clicks every pattern found in the region. I just want to click the first one.
Something like, Click("target.png", region)
Thank you!
|
|
|
Post by AnkuLua on Jul 29, 2016 23:27:22 GMT
reg:click("target.png") or reg:existsClick("target.png")
|
|
|
Post by cris11368 on Aug 25, 2016 15:53:08 GMT
Question, how do I make it so certain images are only searched for in certain regions? Or how do I scan multiple regions at once to look for different results?
Also, the doubleClick() method is way too slow, using two click() methods is much faster. Maybe this is something that should be looked at some point.
|
|
|
Post by AnkuLua on Aug 25, 2016 23:34:48 GMT
To search in certain region
reg = Region(0, 0, 100, 200) -- upleft region with width = 100 and height = 200 reg:click("target.png") Search search multiple region, use table to create region and foreach
regs = {Region(....), Region(.....), .....} for i, m in ipairs(regs) do .... .... end
|
|
|
Post by cris11368 on Aug 26, 2016 14:28:42 GMT
To search in certain region reg = Region(0, 0, 100, 200) -- upleft region with width = 100 and height = 200 reg:click("target.png") Search search multiple region, use table to create region and foreach regs = {Region(....), Region(.....), .....} for i, m in ipairs(regs) do .... .... end
Can you explain the ipairs part? Also the structure of loop statements. I can't seem to find any documentation for them anywhere. I imagine something like this would work rightUpper = Region(960, 0, 1080, 960) leftLower = Region(0, 0, 1080, 960 center = Region(400, 280, 1100, 530) regs = {rightUpper , center, leftLower} clickList = {"a.png", "b.png", "c.png"} for i, m in ipairs(regs) do local choice, listMatch = waitMulti(clickList, 300, skip) if (choice == 1) then -- first image in the array regs:click(getLastMatch()) regs:click(getLastMatch()) else -- everything else should just be a click regs:click(getLastMatch()) end end
|
|
|
Post by AnkuLua on Aug 26, 2016 14:39:35 GMT
No. the waitMulti does not take regions as parameters. Just use following to click the match
click(listMatch)
Here is the method of waitMulti in commonLib.lua
function waitMulti(target, seconds, skipLocation) local timer = Timer() while (true) do for i, t in ipairs(target) do if (i == 1) then usePreviousSnap(false) else usePreviousSnap(true) end if (exists(t, 0)) then -- check once usePreviousSnap(false) return i, getLastMatch() end end if (skipLocation ~= nil) then click(skipLocation) end if (timer:check() > seconds) then usePreviousSnap(false) return -1 end end end
|
|
|
Post by AnkuLua on Aug 30, 2016 10:16:32 GMT
Don't catch your problem.
|
|
narke
New Member
Posts: 7
|
Post by narke on Sept 19, 2016 4:22:03 GMT
I've been using toast for generic debugging, but it's value is limited as I have to be watching script execute in order to see the toast. Is it possible to provide a console in the ankulua gui's screen. Using a debug api we could view a log of messages sent from the script to allow better debugging and understanding what went wrong when scripts don't work as expected.
|
|
|
Post by Devn00b on Nov 2, 2016 14:12:50 GMT
hi they have any random() like rndom number 1 untin 5? i need this exmple : ori code: doubleClick(sit.jpg) doubleClick(random(sit.jpg,1,2) becuz i got new anti cheat detect.. clik same spot click. i want just abit move on click...
sorry for my english...
|
|