Jump to content

PixelSearch Need some help


 Share

Recommended Posts

You just answered your question.

If PixelGetColor(1,1) = 0xFF0000 Then

Sleep(300000)

Whatever else.

Maybe I'm not understanding your question?

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

I want it to do pixelsearch and if it finds it it sleep x then after x it do another pixelsearch (same) and if it fins it will press x else it will just end

If PixelGetColor(1,1) = 0xFF0000 Then

Sleep(300000)

Then If PixelGetColor (x, x) = 0xFF0000 Then Send ("X")

Else EndIf

Or something like that but it wont work :/

Link to comment
Share on other sites

While 1 ;Main loop
    Do
        $color = PixelGetColor(1, 1) ;Waits for (1, 1) to be 0xFF0000
    Until $color = OxFF0000
Sleep(300000) ;Sleeps for 300000ms when $color = 0xFF0000
If PixelGetColor(1, 1) = 0xFF0000 Then Send ("X") ;After the sleep it checks to see if (1, 1) is 0xFF0000. If it is it sends X and if it isn't it waits for $color to = 0xFF0000
WEnd

Or if I've misunderstood and this is just a one shot deal then:

Do
    $color = PixelGetColor(1, 1) ;Waits for (1, 1) to be 0xFF0000
Until $color = OxFF0000
Sleep(300000) ;Sleeps for 300000ms when $color = 0xFF0000
If PixelGetColor(1, 1) = 0xFF0000 Then Send ("X") ;After the sleep it checks to see if (1, 1) is 0xFF0000. If it is it sends X and if it isn't the script closes.
Exit
Edited by jebus495
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...