Sign in to follow this  
Followers 0
BluhBlah

PixelSearch Need some help

5 posts in this topic

How can i make this by using pixelsearch/PixelGetColor:

IT makes pixelsearch and if it finds then it sleeps 300000 then it does another pixelsearch and if it is there it does x else endIf.

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
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 :/

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

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