I couldn't find what I did looked for so... here it goes...
Features : No close button ect., movable , expandable form, on right click exits. Configurated for direct execution.
https://gist.githubusercontent.com/J132 ... bsnone.lua
Now in fact , !important part , above code is actually "my unneeded"... I need that part in order write next part... (you cant make step two without one) well at least for now I dont need that -- from this I could make great visual trainer (simplicity)... Anyway...
I actually needed an region "scope" -- i meant an region capture for getpixel stuff... so to speak am working on macro form which is planned? to be shared at some point Soon™ probably too soon...
to check region for pixel I tried this following :
Code: Select all
createThread(function()
print("RUNNING... PLEASE BE WAIT")
function toHtmlHex(color)
local G = (color >> 8) & 0xFF
local B = (color >> 16) & 0xFF
local R = color & 0xFF
return string.format("%02X%02X%02X", R,G,B)
end
lookforcolor = 0x0000FF -- this is converted from html hex color to CE stuff...
for i=f.Left,f.Left+f.getWidth() do
for u=f.Top,f.Top+f.getHeight()do
local seen = getPixel(i,u)
if lookforcolor==( seen ) then
print(i,u,toHtmlHex( seen ))
return i,u
end
end
end
print("DIDN'T FIND PIXEL COLOR AT REGION")
end)Note : if you gonna use this code avoid detecting red , black and white colors .... (255 , 0 , 16777215) -- Because then it will detect self.
Note 2 : Code is really slow detecting pixel at region.
(why) note and you can use the builtin dragnow function yet! The difference from this is that the onmouseup event won't execute if dragNow is used and after dragging and releasing the cursor will be stuck at crSizeAll. So this is a more flexible approach (well... more control over the code).
