Цитата(nykep @ 20.3.2024, 16:42)

Код
--lua
local screen = loadimage([[E:\screen.bmp]]) -- screen - address in memory
local a = findcolor (0, 0 ,1920, 1080, 66047, '%arr', screen, 1, 0)
if a then
move (arr[1][1], arr[1][2])
end
deleteimage(screen)
I think this is what you need, BUT some coordinate shifts are possible here. I don't know how exactly this works.
https://uopilot.uokit.com/wiki/index.php?title=LoadImagehttps://uopilot.uokit.com/wiki/index.php?ti...Loadimage_(Lua)Thank you very much! In lua it worked perfectly, it looked like this:
Код
--lua
local screen = loadimage([[C:\test1.png]])
local a = findcolor (0, 0 ,1920, 1080, 14085954 , '%arr', screen, 1, 0)
if a then
log ("True")
else
log ("False")
end
deleteimage(screen)
But my main script is not in lua, I did it natively, I tried using loadimage as follows:
Код
set %a [1] LoadImage (C:\test1.png)
set #a findcolor (0 0 1920 1080 (14085954 ) %arr 2 )
if #a > 0
log True
else
log False
end_if
If I could make the logic work natively without calling another lua script in uopilot it would be better. Do you think it is possible to call the image in memory using findcolor after loadimage without using --lua?