Jump to content
Sign in to follow this  
plankton

How do I merge these conditions together?

Recommended Posts

I need to search pixel on both area, but when I combine it using If - and - then. It seems that it skips the
If PixelSearch(712, 137, 906, 244, 0x000000)
   PixelGetcolor( 101, 135) == 0x35A8F2)
   
   Here is how I merge
   
Func ESCANDQUIT()
   If PixelSearch(712, 137, 906, 244, 0x000000) & PixelGetcolor( 101, 135) == 0x35A8F2) then
   Send("{ESC DOWN}")
   Sleep (100)
   Send("{ESC UP}")
   Sleep (3000)
EndIf
EndFunc

It seems like it just jump to send ESC line without performing pixelsearch and pixelgetcolor. What did I do wrong?

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...