Jump to content
Sign in to follow this  
DragoooN

If the color = there then..?

Recommended Posts

DragoooN

Hi there! I would want help with a code.

I also want to let a color on the screen come up, and when it has comes up a messagebox will come up!

So what i have to do is to get the cordinate.

So if i do like this

$color = PixelSearch( 36, 316, 40, 320, 0x0F2498, 1, 2 ) ;heres the location and color that will come up sometime

;then i wonder to make a loop or something :S

;tried this

$variable = 1

While $variable = 1

If $color = ??????? then

MsgBox(0,"Testing!","Did it work?")

$variable = 0

Endif

WEnd

Would something like this work!? i dont really know how im gonna do the "if $color = ?????? then" line!

I also need that if the $color is right then the msgbox will popup. (i was try with = true, but it was popup box directly.. Probly because of its true all time :)!)

Share this post


Link to post
Share on other sites
DragoooN

Hmm... IF this isn't possible then can someone say it!? Cause it looks like peoples know alot harder things that is online and respond on other threads? :) But i not get any respond on this o_O

If you not understand what i was ask for then tell me and i will try explain better..

Share this post


Link to post
Share on other sites
dgarrett8

you are trying to make a bot, no?


"I think, therefore I am"[size="1"]René Descartes[/size]

Share this post


Link to post
Share on other sites
DragoooN

try looking here

Is like that i've done, but the guy who wrote first post, i want make like that.

The code

PixelGetColor, color, ( 1132 , 647 )

if color = 0xEDECEC then

Didn't work, and its like that i want it.

If im gonna do it with the pixelsearch how do i write it then? (because this has the name color? or should anyway.

Share this post


Link to post
Share on other sites
jvanegmond

You don't normally check the return variable of PixelSearch, but in stead you check the @error flag that it sets if the function failed.

$color = PixelSearch( 36, 316, 40, 320, 0x0F2498, 1, 2 ) ;heres the location and color that will come up sometime
if Not @error then
MsgBox(0,"Testing!","It worked now.")
Endif

Share this post


Link to post
Share on other sites
billthecreator

Is like that i've done, but the guy who wrote first post, i want make like that.

The code

PixelGetColor, color, ( 1132 , 647 )

if color = 0xEDECEC then

Didn't work, and its like that i want it.

If im gonna do it with the pixelsearch how do i write it then? (because this has the name color? or should anyway.

you have to scroll down on the page. i gave an example


[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

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  

×