Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Mon Apr 21, 2014 2:58 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Number Recognition
Thanked: 0 time(s)  Unread post Posted: Tue Mar 26, 2013 11:29 am 
New User
New User



Joined: Sun Mar 17, 2013 4:28 pm
Posts: 14
Been thanked: 0 time(s)
Has thanked: 14 time(s)
Contribution Points: 30
Hi, I'm creating a bot to recognize different numbers that come out on the screen, and as they leave the mouse is to click on a point that I decided to click on the number released. I used the (Color.Pixel pattern can be located on screen) and apparently the numbers recognize them well. The problem, though, is that I noticed a lag between the recognition of the number and the click of the mouse, since I added another 4 numbers, to be recognized in the code.
I also noticed that (macro eye) law, yes, the numbers, but then and the other.
A practical example: I have entered 4 numbers, the number 1-2-3-4.
When is the number 1, the recognition is fast and easy.
When, instead, exits the number 4, the recognition and the click is not more rapid.
This is because (macro eye) first reads the number 1, if it is not released reads the number 2, if it is not released reads the number 3 etc.. etc..
Now I wonder ... There is a way to read them all simultaneously, so that there are no breaks between a recognition of a number and the other?
Thanks in advance for your reply.


Top
 Profile  
Reply with quote  
 Post subject: Re: Number Recognition
Thanked: 1 time(s)  Unread post Posted: Tue Mar 26, 2013 11:49 am 
Gold Contributor
Gold Contributor



Joined: Sat Oct 13, 2012 3:41 pm
Posts: 357
Been thanked: 62 time(s)
Has thanked: 28 time(s)
Contribution Points: 573
You could use 4 separate macros running at the same, one checking each number, time and have them change a global variable that your main macro reacts to

_________________
Feel free to give constructive criticism to any code I post
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Number Recognition
Thanked: 0 time(s)  Unread post Posted: Tue Mar 26, 2013 1:44 pm 
New User
New User



Joined: Sun Mar 17, 2013 4:28 pm
Posts: 14
Been thanked: 0 time(s)
Has thanked: 14 time(s)
Contribution Points: 30
Thank you very much, stairbuilder, for your reply. Now try and then let you know.


Top
 Profile  
Reply with quote  
 Post subject: Re: Number Recognition
Thanked: 0 time(s)  Unread post Posted: Tue Mar 26, 2013 2:30 pm 
New User
New User



Joined: Sun Mar 17, 2013 4:28 pm
Posts: 14
Been thanked: 0 time(s)
Has thanked: 14 time(s)
Contribution Points: 30
Hello,stairbuilder. I have a question to ask ... As I can, however, start the 4 macro at the same time?
Could you help me, please?
Thank you again.


Top
 Profile  
Reply with quote  
 Post subject: Re: Number Recognition
Thanked: 1 time(s)  Unread post Posted: Tue Mar 26, 2013 2:42 pm 
Gold Contributor
Gold Contributor



Joined: Sat Oct 13, 2012 3:41 pm
Posts: 357
Been thanked: 62 time(s)
Has thanked: 28 time(s)
Contribution Points: 573
what I do to run multiple macros at the same time is just add this line at the beginning of the main macro
Code:
Macro.Execute new("MacroCategory", "MacroName", "no")

_________________
Feel free to give constructive criticism to any code I post
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Number Recognition
Thanked: 0 time(s)  Unread post Posted: Tue Mar 26, 2013 5:05 pm 
New User
New User



Joined: Sun Mar 17, 2013 4:28 pm
Posts: 14
Been thanked: 0 time(s)
Has thanked: 14 time(s)
Contribution Points: 30
Hello, I solved it in the end. But nothing has changed, though. It 's very late in identifying the number and click with the left mouse button.
How is this possible?


Top
 Profile  
Reply with quote  
 Post subject: Re: Number Recognition
Thanked: 1 time(s)  Unread post Posted: Tue Mar 26, 2013 8:11 pm 
Gold Contributor
Gold Contributor



Joined: Sat Oct 13, 2012 3:41 pm
Posts: 357
Been thanked: 62 time(s)
Has thanked: 28 time(s)
Contribution Points: 573
I would assume that the larger the pixel pattern the longer it will take to id it
also you should narrow down the search, so it isn't looking across the whole screen, if possible with what you are doing

_________________
Feel free to give constructive criticism to any code I post
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Number Recognition
Thanked: 0 time(s)  Unread post Posted: Wed Mar 27, 2013 6:27 pm 
New User
New User



Joined: Sun Mar 17, 2013 4:28 pm
Posts: 14
Been thanked: 0 time(s)
Has thanked: 14 time(s)
Contribution Points: 30
Hello, what I'm trying to do is to read a number that appears on the screen and then click the same number on another part.
This I did. The problem is that the identification number and the click of the mouse is very late, and sometimes ... does not recognize the number.
I put all the pixels within the number. I do something wrong?
I noticed that if I put a few pixels, the number is not recognized, but ... macro eye identifies all the numbers that the number in question.
I do not understand.
Thanks again for your reply.


Top
 Profile  
Reply with quote  
 Post subject: Re: Number Recognition
Thanked: 1 time(s)  Unread post Posted: Wed Mar 27, 2013 9:43 pm 
Gold Contributor
Gold Contributor



Joined: Sat Oct 13, 2012 3:41 pm
Posts: 357
Been thanked: 62 time(s)
Has thanked: 28 time(s)
Contribution Points: 573
try and find a smaller group of pixels that will work and that will speed things up
also you can use
Code:
Color.Limit area of interest to coordinates("100", "100", "250", "250")

to limit the area that your macro searches for the number
you can get more info on that here
viewtopic.php?f=162&t=581

_________________
Feel free to give constructive criticism to any code I post
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Number Recognition
Thanked: 0 time(s)  Unread post Posted: Wed Mar 27, 2013 10:29 pm 
New User
New User



Joined: Sun Mar 17, 2013 4:28 pm
Posts: 14
Been thanked: 0 time(s)
Has thanked: 14 time(s)
Contribution Points: 30
Hello,stairbuilder. Thanks again for your reply.
Now I do not understand how I can change the code. How do I find the number of pixels?
In my code I entered ...

if Color.Pixel pattern can be located on screen
begin
Mouse.Click at coordinate ("454", "128", "left")
end


The code you gave me is in the section (begin) and (if).
How can click the mouse coordinates if I start with (begin)?
I should start with (if) is not it?
Thanks again for everything.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

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:  
cron


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