Jump to content
Sign in to follow this  
nusaki

Need help with PixelSearch

Recommended Posts

nusaki

Hey all I have two scripts one using pixel search and other PixelGetColor. They all check the same pixel but Pixel search doesnt work for me can you help me fix problem?

This one works great

Func Find8()

$col=pixelgetcolor(254,549)

if $col=16777215 then

msgbox(0,"","black",0)

else

msgbox(0,"","white"&$col ,0)

endif

EndFunc

But this one doesnt

Func Find8()

$z = PixelSearch( 254, 254, 549, 549, 0x000000 )

if $z = true then

MsgBox(0, "AutoIt Example", "black!")

Sleep (200)

endif

EndFunc

Also, can I use if $col=0x000000 then instead of if $col=16777215 then?


keywen.com

Share this post


Link to post
Share on other sites
oMBRa

if $col=16777215 then

msgbox(0,"","black",0)

"16777215" is white not black

your first func search at coordinates X:254 and Y:549

while your second function search in a rectangle with the upper left corner at X: 254, Y: 254

so it isnt the same

Edited by oMBRa

Share this post


Link to post
Share on other sites
bogQ

Also, can I use if $col=0x000000 then instead of if $col=16777215 then?

y can do something like this

$col = "0x"&Hex(pixelgetcolor(254,549), 6)
if $col = "0x000000" then
...
EndIf
Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×