Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

PixelSearch Bug?


  • Please log in to reply
1 reply to this topic
nick
  • Members
  • 549 posts
  • Last active: Jul 03 2010 09:31 PM
  • Joined: 24 Aug 2005
Hi Chris,

have a look on http://www.autohotke...pic.php?t=13331 , please.

I tried
PixelSearch, 50, 50, 400, 400, 0x123456, 0, Fast
if ErrorLevel = 0
{
   MsgBox, Found
}
Else
{
   MsgBox, Errorlevel %Errorlevel%
}
PixelSearch, X, Y, 50, 50, 400, 400, 0x123456, 0, Fast
if ErrorLevel = 0
{
   MsgBox, Found
}
Else
{
   MsgBox, Errorlevel %Errorlevel%
}
PixelSearch, , , 50, 50, 400, 400, 0x123456, 0, Fast
if ErrorLevel = 0
{
   MsgBox, Found
}
Else
{
   MsgBox, Errorlevel %Errorlevel%
}Exit

First one sets ErrorLevel to 0, second and third one to 1 (as should!)

Bug or not bug :?:
nick :wink:

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

PixelSearch, 50, 50, 400, 400, 0x123456, 0, Fast
First one [wrongly?] sets ErrorLevel to 0

That uses the wrong syntax. I'll change the docs to read, "may be left blank" rather than "may be omitted".

Thanks.