Jump to content

Detect Movement / Colour ... And then ?


Recommended Posts

Hey there!..

I'm trying to make this sort of program with the main idea:

I. Wait for a window

II. Wait a bit longer and then

III. Start searching for a colour / searching for movement .. and if that is detected, then

IV. Do some action.

Basicly the waiting for the window and stuff is no problem, but when it comes to the part where I would need the

script to first search for a colour, or wait for a movement, and then send for example space button, it doesnt work. :P

Ive used both Pixelsearch and Pixelchecksum and all kinds of other methods, but i cant get it to work. I guess this

type of script would be somewhat like the ususal " world of warcraft fishing bots ", but this script is meant for something

else,

Its for a game, that requires fast reflexes. A green light shows up, and then you should press space as soon as possible.

If anyone would have the time to give me any idea how to work out the Pixelsearches etc I would be very,very happy! :)

;--------------------------------------
Sleep ( 1000 )
WinActive ( "" ); Name of the specific Window
Sleep ( 1000 )
Mouseclick ( "left" , 340, 490, 1, 0 )
Sleep ( 3000 )
;--------------------------------------
; Now the next part im not at all sure about.
;--------------------------------------
While 1
    Do
    $coord = PixelSearch( 295, 450, 391, 535, 0x009A00, 40, 4 ); Greenish Colour
    sleep(30)
until    $coord = PixelSearch( 295, 450, 391, 535, 0x009A00, 40, 4 )
WEnd
Send ("{Space}")
;--------------------------------------
Edited by Odelay
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...