|
Post by AnkuLua on Oct 25, 2019 2:08:44 GMT
Something really handy would be ability to play a sound or send notification someway when cannot find image for X amount of seconds. This would help with captcha or other random rare events. Will consider it.
|
|
stell
New Member
Posts: 3
|
Post by stell on Oct 29, 2019 2:45:09 GMT
How do I make a script keep repeating infinitely until I stop it? After a few minutes of not finding anything on the screen it just stops and requires a restart before it clicks anything again. With debug enabled, the scanning red rectangle flashes rapidly whenever this happens.
I just want it to keep searching forever without giving up.
|
|
|
Post by AnkuLua on Oct 29, 2019 4:32:19 GMT
How do I make a script keep repeating infinitely until I stop it? After a few minutes of not finding anything on the screen it just stops and requires a restart before it clicks anything again. With debug enabled, the scanning red rectangle flashes rapidly whenever this happens. I just want it to keep searching forever without giving up. The script behavior is just as what you said. It never stop except user stops it. Please share the screenshot stopping abnormally.
|
|
stell
New Member
Posts: 3
|
Post by stell on Oct 29, 2019 6:13:43 GMT
It's the game Magia Record. It's not any particular screen that it stops at, it just automatically stops doing clicks after about 3 minutes or so. An example is here:
If I START the script from this screen, it works fine. I use the Rank text to click on, and it clicks on it to move to the next screen just fine.
But when the script has been running for a few minutes, and finishes a battle, it stops here. The script just stops on its own after a few minutes. The red debug border surrounding the screen flashes rapidly when it stops clicking.
It only starts clicking again when I stop the script and start it up again. Like it's on a time limit that only lets it work for 3 minutes.
|
|
|
Post by AnkuLua on Oct 29, 2019 6:18:32 GMT
It's the game Magia Record. It's not any particular screen that it stops at, it just automatically stops doing clicks after about 3 minutes or so. An example is here:
If I START the script from this screen, it works fine. I use the Rank text to click on, and it clicks on it to move to the next screen just fine.
But when the script has been running for a few minutes, and finishes a battle, it stops here. The script just stops on its own after a few minutes. The red debug border surrounding the screen flashes rapidly when it stops clicking.
It only starts clicking again when I stop the script and start it up again. Like it's on a time limit that only lets it work for 3 minutes.
It's because there is nothing to click on the screen within specific regions. Please stop the script and expand the script when starting snap and play script.
|
|
stell
New Member
Posts: 3
|
Post by stell on Oct 29, 2019 8:25:56 GMT
It's the game Magia Record. It's not any particular screen that it stops at, it just automatically stops doing clicks after about 3 minutes or so. An example is here:
If I START the script from this screen, it works fine. I use the Rank text to click on, and it clicks on it to move to the next screen just fine.
But when the script has been running for a few minutes, and finishes a battle, it stops here. The script just stops on its own after a few minutes. The red debug border surrounding the screen flashes rapidly when it stops clicking.
It only starts clicking again when I stop the script and start it up again. Like it's on a time limit that only lets it work for 3 minutes.
It's because there is nothing to click on the screen within specific regions. Please stop the script and expand the script when starting snap and play script. No, it's not. Like I said, it clicks past that screen just fine when I start up the script. Through debug, I can see that it does click on the "Rank" region. It just stops working after a few minutes.
If there were nothing to click on, it wouldn't click on that screen at all. But it does. The script just stops searching after a few minutes, even though there's something to click on.
I'll try to give an example to make this easier to understand: once I reach that screen after a long battle, the program has stopped searching for new images. It won't click on anything new no matter what it is. BUT as soon as I stop the script, then start the same script again, it searches, finds "Rank", and clicks on it. It goes through just fine for a few minutes. Then, after a few minutes, it hits the same screen. But the couple minutes where the program works are over, so it won't click "Rank" again. Unless I restart it.
It's an issue with the program where it stops scanning, not an issue where there's nothing to click on.
|
|
|
Post by AnkuLua on Oct 29, 2019 9:22:48 GMT
It's because there is nothing to click on the screen within specific regions. Please stop the script and expand the script when starting snap and play script. No, it's not. Like I said, it clicks past that screen just fine when I start up the script. Through debug, I can see that it does click on the "Rank" region. It just stops working after a few minutes.
If there were nothing to click on, it wouldn't click on that screen at all. But it does. The script just stops searching after a few minutes, even though there's something to click on.
I'll try to give an example to make this easier to understand: once I reach that screen after a long battle, the program has stopped searching for new images. It won't click on anything new no matter what it is. BUT as soon as I stop the script, then start the same script again, it searches, finds "Rank", and clicks on it. It goes through just fine for a few minutes. Then, after a few minutes, it hits the same screen. But the couple minutes where the program works are over, so it won't click "Rank" again. Unless I restart it.
It's an issue with the program where it stops scanning, not an issue where there's nothing to click on.
Which version of AnkuLua did you use? Please always use the latest one.
|
|
|
Post by mrmacaro45 on Oct 31, 2019 5:44:26 GMT
Hello, want to ask how i make that after the script click a image wait a moment Example: ----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) scriptDimension = 2560 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
------ 1 ----- touchList[index] = {target = "3.png", region = Region(1953, 1229, 150, 150), id = "3", action = 'click'} index = index + 1
------ 2 ----- touchList[index] = {target = "2.png", region = Region(2120, 1232, 150, 150), id = "2", action = 'click'} index = index + 1
------ 3 ----- touchList[index] = {target = "8.png", region = Region(977, 302, 150, 150), id = "8", action = 'click'} index = index + 1
------ 4 ----- touchList[index] = {target = "4.png", region = Region(387, 35, 150, 150), id = "4", action = 'click'} index = index + 1
------ 5 ----- touchList[index] = {target = "1.png", region = Region(1217, 742, 150, 150), id = "1", action = 'click'} index = index + 1
------ 6 ----- touchList[index] = {target = "7.png", region = Region(2266, 655, 150, 150), id = "7", action = 'click'} index = index + 1
------ 7 ----- touchList[index] = {target = "6.png", region = Region(2174, 597, 150, 150), id = "6", action = 'click'} index = index + 1
------ 8 ----- touchList[index] = {target = "5.png", region = Region(2226, 646, 150, 150), id = "5", action = 'click'} index = index + 1
the -------4------ is a auto button, after click the button, i want to wait like 125 seconds becacuse is the time that stage take to clear, i mean is work but is click when is found again, and some times dont found the button beacuse of background.
Thanks.
|
|
|
Post by AnkuLua on Oct 31, 2019 13:17:32 GMT
Hello, want to ask how i make that after the script click a image wait a moment Example: ----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) scriptDimension = 2560 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {} ------ 1 ----- touchList[index] = {target = "3.png", region = Region(1953, 1229, 150, 150), id = "3", action = 'click'} index = index + 1 ------ 2 ----- touchList[index] = {target = "2.png", region = Region(2120, 1232, 150, 150), id = "2", action = 'click'} index = index + 1 ------ 3 ----- touchList[index] = {target = "8.png", region = Region(977, 302, 150, 150), id = "8", action = 'click'} index = index + 1 ------ 4 ----- touchList[index] = {target = "4.png", region = Region(387, 35, 150, 150), id = "4", action = 'click'} index = index + 1 ------ 5 ----- touchList[index] = {target = "1.png", region = Region(1217, 742, 150, 150), id = "1", action = 'click'} index = index + 1 ------ 6 ----- touchList[index] = {target = "7.png", region = Region(2266, 655, 150, 150), id = "7", action = 'click'} index = index + 1 ------ 7 ----- touchList[index] = {target = "6.png", region = Region(2174, 597, 150, 150), id = "6", action = 'click'} index = index + 1 ------ 8 ----- touchList[index] = {target = "5.png", region = Region(2226, 646, 150, 150), id = "5", action = 'click'} index = index + 1 the -------4------ is a auto button, after click the button, i want to wait like 125 seconds becacuse is the time that stage take to clear, i mean is work but is click when is found again, and some times dont found the button beacuse of background. Thanks. Modify the part 4 to touchList[index] = {target = "4.png", region = Region(387, 35, 150, 150), id = "4", action = 'click(matchResult); wait(125)'}
index = index + 1
|
|
|
Post by mrmacaro45 on Oct 31, 2019 16:21:21 GMT
Hello, want to ask how i make that after the script click a image wait a moment Example: ----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) scriptDimension = 2560 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {} ------ 1 ----- touchList[index] = {target = "3.png", region = Region(1953, 1229, 150, 150), id = "3", action = 'click'} index = index + 1 ------ 2 ----- touchList[index] = {target = "2.png", region = Region(2120, 1232, 150, 150), id = "2", action = 'click'} index = index + 1 ------ 3 ----- touchList[index] = {target = "8.png", region = Region(977, 302, 150, 150), id = "8", action = 'click'} index = index + 1 ------ 4 ----- touchList[index] = {target = "4.png", region = Region(387, 35, 150, 150), id = "4", action = 'click'} index = index + 1 ------ 5 ----- touchList[index] = {target = "1.png", region = Region(1217, 742, 150, 150), id = "1", action = 'click'} index = index + 1 ------ 6 ----- touchList[index] = {target = "7.png", region = Region(2266, 655, 150, 150), id = "7", action = 'click'} index = index + 1 ------ 7 ----- touchList[index] = {target = "6.png", region = Region(2174, 597, 150, 150), id = "6", action = 'click'} index = index + 1 ------ 8 ----- touchList[index] = {target = "5.png", region = Region(2226, 646, 150, 150), id = "5", action = 'click'} index = index + 1 the -------4------ is a auto button, after click the button, i want to wait like 125 seconds becacuse is the time that stage take to clear, i mean is work but is click when is found again, and some times dont found the button beacuse of background. Thanks. Modify the part 4 to touchList[index] = {target = "4.png", region = Region(387, 35, 150, 150), id = "4", action = 'click(matchResult); wait(125)'}
index = index + 1
Thanks that work, also is possible to make the click random so can evade the ban for macro? or the click is random as along we make the pixel large of snap? Thanks again.
|
|
|
Post by AnkuLua on Oct 31, 2019 23:24:27 GMT
Modify the part 4 to touchList[index] = {target = "4.png", region = Region(387, 35, 150, 150), id = "4", action = 'click(matchResult); wait(125)'}
index = index + 1
Thanks that work, also is possible to make the click random so can evade the ban for macro? or the click is random as along we make the pixel large of snap? Thanks again. There is random option in playback settings.
|
|
|
Post by qq12345 on Dec 11, 2019 3:22:57 GMT
Sorry, it should be while(existsClick("target.png",0)) do end 1. No. The numbers 0 and 1 is the MAXIMUM search time. If the image is found on first screenshot, then the results are the same. 2. Yes. Just change the values in region = Region(...). 3. Image search is always in grey. Use getColor() to get the color of a location. Hi Boss, any example of how to search in colour using snap in play? I need to click an image when it is say orange. (normally it is grey until something else is done.) Basically only need for this one image.
|
|
|
Post by AnkuLua on Dec 11, 2019 8:08:27 GMT
Sorry, it should be while(existsClick("target.png",0)) do end 1. No. The numbers 0 and 1 is the MAXIMUM search time. If the image is found on first screenshot, then the results are the same. 2. Yes. Just change the values in region = Region(...). 3. Image search is always in grey. Use getColor() to get the color of a location. Hi Boss, any example of how to search in colour using snap in play? I need to click an image when it is say orange. (normally it is grey until something else is done.) Basically only need for this one image. Change to action = 'click' to action = 'r, g, b = getColor(matchResult); if (r ~= g or r ~= b or g~= b) then click(matchResult) end'
|
|
|
Post by qq12345 on Dec 13, 2019 18:36:07 GMT
Boss, is it possible to search for two image at once? Like only if a+b found, then click a.
|
|
|
Post by AnkuLua on Dec 14, 2019 9:16:41 GMT
Boss, is it possible to search for two image at once? Like only if a+b found, then click a. modify the action of "a.png" as following if (exists("b.png", 0)) then click(matchResult) end
|
|