Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Jun 04, 2020 5:58 am

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: While loop not ending at the right time
Thanked: 0 time(s)  Unread post Posted: Tue Apr 21, 2020 6:47 am 
New User
New User

Joined: Tue Apr 21, 2020 5:19 am
Posts: 1
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 13
I want the script to keep clicking until the pixel at a location becomes RGB(114, 114, 216) and stop at that point. However, the problem I'm running into is that it detects that pixel, but then it clicks 1 more time before stopping. What am I doing wrong?

Thank you for any help.

     Mouse.Set coordinate("107", "294")
     Keyboard.Hold keys("{<shift>}")
     while  Color.At coordinate is (RGB)("114", "114", "216", "475", "370")
               Variable.Set random number("ms", "355", "500")
               Mouse.Move to coordinate("318", "467")

Reply with quote  
 Post subject: Re: While loop not ending at the right time
Thanked: 0 time(s)  Unread post Posted: Wed Apr 22, 2020 4:47 am 
Partner / License admin
Partner / License admin
User avatar

Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2056
Location: USA
Been thanked: 461 time(s)
Has thanked: 35 time(s)
Contribution Points: 17073
Post the execution log so I can read what it's doing.

Without seeing the log, I would guess that it's just the timing. You have 2 things going that take some time to complete before it checks for the pixel again:
- so it sees the correct color and starts the "begin" statement
-- if the color changes at any point now...BEM has to finish what you put in that statement before checking again
- it now has to pause for the variable time
- and then move the mouse (which isn't instant so it takes a lil time also)
- then clicks
--- after it finishes all that it will check again. So if the color changed while performing those actions, it will still click

* you also hold down the "shift" key and never release it. Not a good practice especially if you are using virtual drivers. It could potentially cause you problems in the long run.

Anyway, if I can see the execution log I could probably tell you more.

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

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