AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pixelsearch help

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
tmahan



Joined: 15 Mar 2005
Posts: 3

PostPosted: Fri Mar 18, 2005 12:37 pm    Post subject: pixelsearch help Reply with quote

I am trying to string together a few pixelsearch statements where it searches for a color, if it finds it, it performs some action, if it doesnt find it, it searches for another color

I am having some trouble scripting it. I tried it like this..


PixelSearch, Px, Py, 333, 84, 341, 91, Green
if ErrorLevel = 0
MsgBox, Green was found in the specified region.
else
pixelSearch, Px, Py, 333, 75, 341, 81, Blue
if ErrorLevel = 0
MsgBox, blue was found in the specified region.
else
exit

Any thoughts?
Back to top
View user's profile Send private message
ILL.1



Joined: 29 Sep 2004
Posts: 84

PostPosted: Fri Mar 18, 2005 1:20 pm    Post subject: Reply with quote

Perhaps something like this:

Code:
PixelSearch, Px, Py, 333, 84, 341, 91, Green
if ErrorLevel = 0
{
   MsgBox, Green was found in the specified region.
   Return
}
PixelSearch, Px, Py, 333, 75, 341, 81, Blue
if ErrorLevel = 0
{
   MsgBox, blue was found in the specified region.
   Return
}
exit

_________________
===============
----------ILL.1-----------
===============
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group