Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Tue Oct 20, 2020 9:28 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: need some help to make it work like if else if
Thanked: 0 time(s)  Unread post Posted: Sat Oct 17, 2020 9:58 pm 
New User
New User



Joined: Sat Oct 17, 2020 9:39 pm
Posts: 1
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 10
hi guys
i have this function
Code:
 if  Color.At coordinate is not (RGB)("188", "188", "188", "28", "426")
          and
          Color.At coordinate is not (RGB)("199", "58", "55", "325", "412")
          begin
               Macro.Wait for current global loop execution time to exceed("160")
               Mouse.Move to coordinate("284", "489")
               Macro.Wait for current global loop execution time to exceed("543")
               Mouse.Click at coordinate("284", "489", "left")
               Macro.Wait for current global loop execution time to exceed("662")
               Mouse.Move to coordinate("294", "450")
               Macro.Wait for current global loop execution time to exceed("854")
               Macro.Pause("1500")
          end
     if  Color.At coordinate is not (RGB)("180", "180", "180", "26", "425")
          and
          Color.At coordinate is not (RGB)("199", "58", "55", "325", "412")
          begin
               Macro.Wait for current global loop execution time to exceed("160")
               Mouse.Move to coordinate("284", "489")
               Macro.Wait for current global loop execution time to exceed("543")
               Mouse.Click at coordinate("284", "489", "left")
               Macro.Wait for current global loop execution time to exceed("662")
               Mouse.Move to coordinate("294", "450")
               Macro.Wait for current global loop execution time to exceed("854")
               Macro.Pause("1500")
          end

it's function that check if there is a pixels in specific coordinate and if it's there then i make action but i got problem when i add more than one if statement i wont work it will just make action and i can't found any solution and there is no if else statement here :(


Top
 Profile  
Reply with quote  
 Post subject: Re: need some help to make it work like if else if
Thanked: 0 time(s)  Unread post Posted: Sun Oct 18, 2020 6:36 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2116
Location: USA
Been thanked: 490 time(s)
Has thanked: 37 time(s)
Contribution Points: 17280
Your two "if" statements are basically looking in the same spot; they are only 2 pixels apart (and the colors are very similar). Both "if" statements say "if color is not" therefore one of them has to run, ie one of them has to be the wrong color; that spot can't be two colors at the same time.

You can check the execution log. It will say checking if color is not...and then provide an answer. If the answer is not what you are expecting then either your coordinates or colors are wrong. Perhaps you just need to tweak them.

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group