Jump to content

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?

Link to comment
Share on other sites

4 hours ago, Network_Guy said:
If PixelSearch(712, 137, 906, 244, 0x000000) and PixelGetcolor( 101, 135) = 0x35A8F2 then
 ;Code
 endif

btw pixelsearch return array not bool so you cant use it that way

Hi, I have tried 

If PixelSearch(712, 137, 906, 244, 0x000000) and PixelGetcolor( 101, 135) = 0x35A8F2 then
 ;Code
 endif

unfortunately it gave the same result

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