Jump to content

If the color = there then..?


 Share

Recommended Posts

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 :)!)

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...