|
Post by yamada on Apr 10, 2017 6:39:14 GMT
AutoMain.luaThis sclipt is for AutoTouch getColors(locations) Get the color values of the pixel points of the specified coordinates on current screen. getColors Adding function !!!!!!!!!!!!!!!!!! Blog link
|
|
|
Post by AnkuLua on Apr 10, 2017 12:21:55 GMT
First, we don't recommend to use getColor(). It destroy the easiness (both writing and reading script) of AnkuLua. We recommend to write the script using image recognition. Therefore, please write the script again. Do not port scripts from other tools that only support getColor().
If you really want to port the scripts, it's doable. Please study the lua language first. It's not difficult.
|
|
|
Post by yamada on Apr 10, 2017 12:44:55 GMT
The Japanese wants getColors ().
This is because image recognition takes time to create data.
Please.
|
|
|
Post by yamada on Apr 10, 2017 13:33:10 GMT
|
|
|
Post by AnkuLua on Apr 10, 2017 14:25:12 GMT
Anything is possible if you want to learn. What's the game?
|
|
|
Post by yamada on Apr 10, 2017 23:07:21 GMT
|
|
|
Post by NeoQB on Apr 24, 2017 5:34:20 GMT
There are game events that requires fast clicks otherwise you will miss the prize because other players will get them first. Using image recognition takes more time and more often than not, the prize has already been taken even before it activates. Adding more functions to getColor can resolve this issue. I'm not sure if I'm allowed to mention but there's this Hi__Macro which gets the color or a specific coordinate and output a numerical value. I hope the same feature could be implemented to Ankulua.
|
|
|
Post by AnkuLua on Apr 24, 2017 5:44:06 GMT
Here is the corresponding function
function getColors(list) local colors = {}
local r, g, b = getColor(Location(list[1][1], list[1][2])) colors[1] = r * 256 * 256 + g * 256 + b
usePreviousSnap(true) for i = 2, #list do r, g, b = getColor(Location(list[i][1], list[i][2])) colors[i] = r * 256 * 256 + g * 256 + b end usePreviousSnap(false)
return colors end
|
|
|
Post by NeoQB on Apr 27, 2017 17:45:04 GMT
What will be the correct way / syntax to call this function? Can you please show an example? Thanks in advance
|
|
|
Post by AnkuLua on Apr 28, 2017 1:13:27 GMT
The purpose is just for script from other automation app. If you don't need to transfer script from other app, you don't need it. If you does, just insert it to the original script.
|
|
|
Post by yamada on May 7, 2017 9:34:25 GMT
|
|