Jump to content

Newbie question - pixel search problem


Recommended Posts

160.jpg

This is visualization of my problem

3 objects with different colors drop down and i need to move Brown arrow by clicking right arrow on keyboard or left arrow  i tryed to make it work and i am still missing something

HotKeySet("{HOME}","start­")
HotKeySet("{end}","stop&q­uot;)
while 1
sleep(100)
WEnd
func stop()
Exit
EndFunc
func start()
while 1
$coord = PixelSearch(402,44,506,109, 0x4B52FF, 10; 0x2B52FF, 10; 0x2G52FF, 10)
    If Not @error Then
        Send("{RIGHT}")
    Elseif @error Then
        Send("{LEFT}")
    EndIf
WEnd
EndFunc
 

Could anyone help me a little i trying to get this work second day but it stil dont wont work :/

Edited by johnyy2000NL
Link to comment
Share on other sites

  • Developers

Welcome,

Just to be sure: please read our forum rules so you know what is done and not-done around here. :)

As to your issue: Seems you are always testing the same area for a pixel.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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