Zori
New Member
Posts: 30
|
Post by Zori on May 26, 2017 22:51:37 GMT
Mercobots it works very well, thank you so much! Can I attack you with more questions in the future, in case I have any?
|
|
|
Post by Mercobots on May 26, 2017 22:53:59 GMT
Your welcome yes for sure, if i don't reply is lack of free time
|
|
Zori
New Member
Posts: 30
|
Post by Zori on May 27, 2017 17:36:47 GMT
Your welcome yes for sure, if i don't reply is lack of free time One last thing, it takes 6 seconds per skip, is there a way to reduce the time it takes to image recognition? Thanks in advance man <3
|
|
|
Post by Mercobots on May 27, 2017 17:52:09 GMT
Hi you can made some changes, reduce the time out and similarly, since the skip btn is always at the same place use a location instead of image match
|
|
Zori
New Member
Posts: 30
|
Post by Zori on May 27, 2017 19:47:24 GMT
Hi you can made some changes, reduce the time out and similarly, since the skip btn is always at the same place use a location instead of image match What does the time out in charge of? And is the toast() function make any difference in the running time?
|
|
|
Post by Mercobots on May 27, 2017 19:50:33 GMT
Time out is the max time the bot will try find you image, try set to 1 just for test, the toast so far doesn't make any difference
|
|
Zori
New Member
Posts: 30
|
Post by Zori on May 28, 2017 0:01:39 GMT
Time out is the max time the bot will try find you image, try set to 1 just for test, the toast so far doesn't make any difference Ok, Thanks <3 And another question, do you know if there is a way to save a screenshot of the screen into the screenshots folder? and if so, is there a way to do so without the AnKuLua widget? Thanks in advance <3
|
|
|
Post by Mercobots on May 28, 2017 0:28:01 GMT
on mobile maybe the home button + volume up/down ? or with screenshot you wanna say crop a small image
|
|
Zori
New Member
Posts: 30
|
Post by Zori on May 28, 2017 0:41:04 GMT
on mobile maybe the home button + volume up/down ? or with screenshot you wanna say crop a small image No no no, lets say when a boolean is turned into true, take a screenshot of the screen (programly) and save it in a specific path, without the loa symbol
|
|
|
Post by Mercobots on May 28, 2017 0:45:06 GMT
really don't know, the only way i see on the moment is set a region without the ankulua wid and use save() but the screenshot will be grayscale
|
|
Zori
New Member
Posts: 30
|
Post by Zori on May 28, 2017 0:47:05 GMT
really don't know, the only way i see on the moment is set a region without the ankulua wid and use save() but the screenshot will be grayscale Well I can do without it Thanks a lot man!
|
|
Zori
New Member
Posts: 30
|
Post by Zori on Jun 4, 2017 17:25:14 GMT
Hi buddy I have some questions i gathered since then: -Is there a way to make the script run in with an app in the background? -Is there a way to make the script run while the screen is off? -Is there a way to write things to a log file? -Is there a possibility to implement a switch case expression?
|
|
|
Post by Mercobots on Jun 4, 2017 18:09:12 GMT
Hi buddy I have some questions i gathered since then: -Is there a way to make the script run in with an app in the background? -Is there a way to make the script run while the screen is off? -Is there a way to write things to a log file? -Is there a possibility to implement a switch case expression? -Is there a way to make the script run in with an app in the background?i'm not sure if i understand the question, you wanna run the script with another app instead of ankulua? or you wanna run the script + 1 app on background? -Is there a way to make the script run while the screen is off?I don't know if it's possible only with ankulua but if your goal is "hide your phone" on school or work you can always create a highlight totally black -Is there a way to write things to a log file?Yes, simple create a file and write the things you need there -Is there a possibility to implement a switch case expression?Lua don't have switch statement There are several ways to do this, i will show 2 methods 1º method if op == "OP1" then elseif op == "OP2" then elseif op == "OP3" then elseif op == "OP4" then else -- default end 2º method switch = { op1 = function() print("My OP1") end, op2 = function() print("My OP2") end, op3 = function() print("My OP3") end, op4 = function() print("My OP4") end, op5 = function() print("My OP5") end, op6 = function() print("My OP6") end, }
-- --
choice = "op1"
if switch[choice] then switch[choice]() else --default end
|
|
Zori
New Member
Posts: 30
|
Post by Zori on Jun 4, 2017 20:09:22 GMT
Hi buddy I have some questions i gathered since then: -Is there a way to make the script run in with an app in the background? -Is there a way to make the script run while the screen is off? -Is there a way to write things to a log file? -Is there a possibility to implement a switch case expression? -Is there a way to make the script run in with an app in the background?i'm not sure if i understand the question, you wanna run the script with another app instead of ankulua? or you wanna run the script + 1 app on background? -Is there a way to make the script run while the screen is off?I don't know if it's possible only with ankulua but if your goal is "hide your phone" on school or work you can always create a highlight totally black -Is there a way to write things to a log file?Yes, simple create a file and write the things you need there -Is there a possibility to implement a switch case expression?Lua don't have switch statement There are several ways to do this, i will show 2 methods 1º method if op == "OP1" then elseif op == "OP2" then elseif op == "OP3" then elseif op == "OP4" then else -- default end 2º method switch = { op1 = function() print("My OP1") end, op2 = function() print("My OP2") end, op3 = function() print("My OP3") end, op4 = function() print("My OP4") end, op5 = function() print("My OP5") end, op6 = function() print("My OP6") end, }
-- --
choice = "op1"
if switch[choice] then switch[choice]() else --default end Run the script + 1 app on background, so I could do other stuff. How do I do that black highlight? And how do I write into a log file with ankulua? And thanks again mate, I really appreciate it.
|
|
|
Post by Mercobots on Jun 4, 2017 21:08:13 GMT
black highlighlocal screen = Region(0,0,getRealScreenSize():getX(),getRealScreenSize():getY()) setHighlightStyle (0xff000000, true) screen:highlight() wait(2) screen:highlightOff() toast("end") this will cover all screen whit a black highlight , you can't stop the black screen until you stop the script or create a Timer() to show the game for a bref period of time be aware this only create a black "canvas", so all human action on screen will be accepted Log filelocal root = scriptPath() local logo_file = "logoFile.txt"
local f = io.open(root .. logo_file, "a+")
f:write("hello World") f:write("","\r\n") -- new line f:write("new line","\r\n") f:write("2 new line")
f:close() a+ Append mode with read mode enabled that opens an existing file or creates a new file. More modes www.tutorialspoint.com/lua/lua_file_io.htmRun the script + 1 app on background, so I could do other stuff.
To be absolutely honest with you i'm not the right person to help you on this matter, but if your "2º app" already run in background you only need to use startApp()
|
|