Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Sat Apr 20, 2019 11:13 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: code question
Thanked: 0 time(s)  Unread post Posted: Tue Jan 15, 2019 5:53 am 
New User
New User



Joined: Tue Jan 15, 2019 5:37 am
Posts: 5
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 10
is there anyone can help me?

I'm trying to figure it out how my Macro would work perfectly.

what I'm trying to do is, the colored red text Macro will not overlap with the macro codes below it.

for example, if the Red text macro is True, it will not continue further unless if false then it can proceed to continue the below macro.

below is the codes:

begin loop()
if Color.At coordinate is not (RGB)("233", "233", "232", "1782", "218")
begin
mouse.Click at coordinate("1724", "224", "left")
Macro.Pause("1000")
end
if Color.At coordinate is (RGB)("205", "29", "93", "1612", "362")
begin
mouse.Click at coordinate("1612", "362", "left")
Macro.Pause("0")
end


if Color.At coordinate is not (RGB)("134", "125", "130", "572", "272")
begin
Keyboard.Hold keys("{<tab>}")
Macro.Pause("1000")
Keyboard.Release keys("{<tab>}")
Macro.Pause("4000")
end
if Color.At coordinate is (RGB)("134", "125", "130", "572", "272")
begin
Keyboard.Hold keys("1")
Macro.Pause("1000")
end
end

thanks for helping in advance.


Top
 Profile  
Reply with quote  
 Post subject: Re: code question
Thanked: 0 time(s)  Unread post Posted: Tue Jan 15, 2019 9:30 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1880
Location: USA
Been thanked: 403 time(s)
Has thanked: 33 time(s)
Contribution Points: 16505
If you've run that script in BEM and then copy/pasted it here...there wouldn't be a line-break between the red and next black text; so, is something missing that you didn't post?

What you posted looks fine and should work as you described you want it to. If you have another "end" in there, then it wouldn't...that's why that line-break is suspicious. BEM would have compiled that empty line and taken it out when ran. Or there's more code that you just didn't post.

Otherwise, run the macro from the BEM main screen and afterwards hit view execution log. The answer to your question should be in there; if you can't see it, post the execution log and I'll take a look at it for you.

_________________
----------------------------------------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  
 Post subject: Re: code question
Thanked: 0 time(s)  Unread post Posted: Thu Jan 17, 2019 7:02 am 
New User
New User



Joined: Tue Jan 15, 2019 5:37 am
Posts: 5
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 10
Hi,

thank you for your reply.. I just played with my codes.. and I manage to figure it out some of the things I wanted to do.
right now it looks like working fine.. but there is one issue that I am currently trying to solve.

its about the red colored script.. what it did is that.. after the color is true.. then it disappear for like milliseconds, it automatically goes to the next script.
what I am trying to do is, wait for half a second for the color to be true again before proceeding to the next script.


if Color.At coordinate is (RGB)("205", "29", "93", "1612", "362")
begin loop()
Humanly.Click at coordinate("1612", "362", "left", "yes")
Macro.Pause("2000")
Macro.Break from loop("yes")
end

if Color.At coordinate is (RGB)("146", "159", "194", "943", "919")
begin
Keyboard.Hold keys("1")
Macro.Pause("1000")
Keyboard.Release keys("1")
Macro.Pause("500")
end


if Color.At coordinate is not (RGB)("60", "87", "140", "572", "274")
begin
if Color.At coordinate is not (RGB)("131", "156", "165", "1089", "952")
begin
Macro.Pause("500")
Keyboard.Hold keys("{<tab>}")
Macro.Pause("1000")
Keyboard.Release keys("{<tab>}")
Macro.Pause("4500")
end
end


Top
 Profile  
Reply with quote  
 Post subject: Re: code question
Thanked: 1 time(s)  Unread post Posted: Thu Jan 17, 2019 2:57 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1880
Location: USA
Been thanked: 403 time(s)
Has thanked: 33 time(s)
Contribution Points: 16505
Quote:
wait for half a second for the color to be true again before proceeding to the next script
Well that part is easy:

if Color.At coordinate is (RGB)("146", "159", "194", "943", "919")
begin
macro.pause("500")
//and then your "if" statement again
if Color.At coordinate is (RGB)("146", "159", "194", "943", "919")

Another option for the second "if" statement is to use "wait (for color to be...)".

The real question is what do you want it to do if it's not that color. That will determine which one you should use.

_________________
----------------------------------------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  
 Post subject: Re: code question
Thanked: 0 time(s)  Unread post Posted: Mon Jan 21, 2019 4:58 am 
New User
New User



Joined: Tue Jan 15, 2019 5:37 am
Posts: 5
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 10
Quote:
The real question is what do you want it to do if it's not that color. That will determine which one you should use.


Hi, thank you for this!

now I fully understand how BEM read the script properly.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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