Sign in to follow this  
Followers 0
Isisagate

Pixelsearch Acts As Though Hex Color Is Black

2 posts in this topic

I have a pretty elaborate script going right now and it's based off a more simplistic script that was hard corded. Here is the trouble some line of code....

$coord = PixelSearch ($gTop, $gLeft, $gRight, $gBottom, $color, $tolerance)

The value of $color seems to be overlooked and treated like it's looking for a black pixel. "000000"

Let me first say the values are loaded from an ini file. I have tried storing them as

color=0xD4F0CE

color=D4F0CE

the only way I can get it to work is if I use decimal notation

color=13955278

is there anyway get the hex string to work?

Share this post


Link to post
Share on other sites



I have a pretty elaborate script going right now and it's based off a more simplistic script that was hard corded. Here is the trouble some line of code....

$coord = PixelSearch ($gTop, $gLeft, $gRight, $gBottom, $color, $tolerance)

The value of $color seems to be overlooked and treated like it's looking for a black pixel. "000000"

Let me first say the values are loaded from an ini file. I have tried storing them as

color=0xD4F0CE

color=D4F0CE

the only way I can get it to work is if I use decimal notation

color=13955278

is there anyway get the hex string to work?

you could do something like this...

$color="D4F0CE"
$coord = PixelSearch ($gTop, $gLeft, $gRight, $gBottom,dec(StringLeft($color,2))&Dec(StringMid($color,3,2))&dec(StringRight($color,2)), $tolerance)

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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  
Followers 0