plankton Posted July 2, 2019 Share Posted July 2, 2019 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 More sharing options...
Developers Jos Posted July 2, 2019 Developers Share Posted July 2, 2019 Where did you find the "&" for an And relation? I am sure the helpfile states otherwise! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Network_Guy Posted July 2, 2019 Share Posted July 2, 2019 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 Link to comment Share on other sites More sharing options...
plankton Posted July 3, 2019 Author Share Posted July 3, 2019 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 More sharing options...
Network_Guy Posted July 3, 2019 Share Posted July 3, 2019 11 hours ago, Network_Guy said: btw pixelsearch return array not bool so you cant use it that way you cant use pixelsearch that way , check Pixelsearch function please . Link to comment Share on other sites More sharing options...
plankton Posted July 4, 2019 Author Share Posted July 4, 2019 Guys Its finally worked using IsArray and then. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now