Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Jul 19, 2018 5:48 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: [Help] Pixel search/getcolor or something???
Thanked: 0 time(s)  Unread post Posted: Sat Jan 14, 2017 9:42 pm 
New User
New User



Joined: Sat Jan 14, 2017 9:40 pm
Posts: 3
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 13
Hey all! I'm new to this and after hours of searching, changing scripts etc. I've given up and I'm asking for your help.
So what I'm trying to do is this.
At a specific pixel location I need to send a key when the color changes. If the color doesn't change, then, ahk does nothing (but remains active in case the color changes).

Closest script I've made so far (with autohotkey tho) is this one,

Code:
F1::
Loop
{
PixelSearch, Px, Py, 121, 121, 915, 915, 231615, 3, Fast
if ErrorLevel = 0
   {
   SendInput {D}
   }
}


But it seems that this script all it does is just press the key (d in that case) again n again no matter the color is there or not..



So in details what i want is this.
When this flask is green like this, should hit D.
Image

BUT

when it's like this, it should do nothing but wait for it to be green again and loop the prev step.
Image


Last edited by DjNanos on Sun Jan 15, 2017 1:22 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Help] Pixel search/getcolor or something???
Thanked: 0 time(s)  Unread post Posted: Sat Jan 14, 2017 10:33 pm 
Silver Contributor
Silver Contributor



Joined: Thu Aug 06, 2015 6:22 pm
Posts: 173
Been thanked: 57 time(s)
Has thanked: 14 time(s)
Contribution Points: 215
is this script for bem cus it doesnt seem like it


Top
 Profile  
Reply with quote  
 Post subject: Re: [Help] Pixel search/getcolor or something???
Thanked: 0 time(s)  Unread post Posted: Sat Jan 14, 2017 11:31 pm 
New User
New User



Joined: Sat Jan 14, 2017 9:40 pm
Posts: 3
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 13
GaNnOuT wrote:
is this script for bem cus it doesnt seem like it



DjNanos wrote:
Closest script I've made so far (with autohotkey tho) is this one,


Top
 Profile  
Reply with quote  
 Post subject: Re: [Help] Pixel search/getcolor or something???
Thanked: 0 time(s)  Unread post Posted: Sat Jan 14, 2017 11:40 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1787
Location: USA
Been thanked: 375 time(s)
Has thanked: 30 time(s)
Contribution Points: 16210
All you need to do is:
Code:
 if  Color.At coordinate is (RGB)("R", "G", "B", "x", "y")
     begin
              Keyboard.Press key("d")
     end

The documentation pages for BEM are here: viewforum.php?f=135

_________________
----------------------------------------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: [Help] Pixel search/getcolor or something???
Thanked: 0 time(s)  Unread post Posted: Sun Jan 15, 2017 12:58 am 
New User
New User



Joined: Sat Jan 14, 2017 9:40 pm
Posts: 3
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 13
Syrifina wrote:
All you need to do is:
Code:
 if  Color.At coordinate is (RGB)("R", "G", "B", "x", "y")
     begin
              Keyboard.Press key("d")
     end

The documentation pages for BEM are here: viewforum.php?f=135




Is this going to activate once or it will be on till i stop using the macro?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Help] Pixel search/getcolor or something???
Thanked: 1 time(s)  Unread post Posted: Sun Jan 15, 2017 8:53 pm 
Silver Contributor
Silver Contributor



Joined: Thu Aug 06, 2015 6:22 pm
Posts: 173
Been thanked: 57 time(s)
Has thanked: 14 time(s)
Contribution Points: 215
DjNanos wrote:
Syrifina wrote:
All you need to do is:
Code:
 if  Color.At coordinate is (RGB)("R", "G", "B", "x", "y")
     begin
              Keyboard.Press key("d")
     end

The documentation pages for BEM are here: viewforum.php?f=135




Is this going to activate once or it will be on till i stop using the macro?


if ur script start with begin it will activate once and if your script start with begin loop() or u tick infinite it will be on until u stop ur script


Top
 Profile  
Reply with quote  
 Post subject: Re: [Help] Pixel search/getcolor or something???
Thanked: 0 time(s)  Unread post Posted: Mon Jan 16, 2017 2:17 pm 
VIP Contributor
VIP Contributor
User avatar



Joined: Sun Oct 13, 2013 9:55 am
Posts: 594
Location: The World That Never Was
Been thanked: 76 time(s)
Has thanked: 9 time(s)
Contribution Points: 1206
or you can use
Code:
if  Color.Pixel pattern can be located on screen("", "")

this will search for pixel pattern, try to pick 3 coordinates to ensure position

this is example of my code
Code:
if  Color.Pixel pattern can be located on screen("54,113,197,-220,-23,75,51,143,43,2,107,187,255,65,-1,24,91,208", "0")
                                   begin
                                        Mouse.Click at pixel pattern("54,113,197,-220,-23,75,51,143,43,2,107,187,255,65,-1,24,91,208", "0", "no", "left")
                                        Macro.Pause("1000")
                                        Mouse.Move in direction("right", "10")
                                   end

i pick 3 coordinates in first quote, and fill 0 to second quote (0=color match exactly), then click at first pixel i choose

_________________
_________________
Dont forget to click
"Thank You"
If I help You


Top
 Profile  
Reply with quote  
 Post subject: Re: [Help] Pixel search/getcolor or something???
Thanked: 0 time(s)  Unread post Posted: Tue Jan 17, 2017 12:09 am 
VIP Contributor
VIP Contributor
User avatar



Joined: Fri Dec 05, 2014 2:04 pm
Posts: 665
Been thanked: 42 time(s)
Has thanked: 2 time(s)
Contribution Points: 21
try to change your resolution


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