Jump to content
Sign in to follow this  
johnyy2000NL

Newbie question - pixel search problem

Recommended Posts

johnyy2000NL

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

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×