Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Wed Nov 21, 2018 5:44 pm

All times are UTC




Post a reply
Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
Font colour
Options:
BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Please click and drag the 2 correct statements to the right hand side.
Please click and drag the 2 correct statements to the right hand side.
Please select the options below to the correct list to avoid automated registrations.
Statements
2 correct statements
Elephants can fly
Chickens can talk
Dogs have 4 legs
Fish can swim
   

Topic review - Pixel Pattern - Find it on screen and save the coordinate.
Author Message
  Post subject:  Re: Pixel Pattern - Find it on screen and save the coordinat  Reply with quote
here is the code based on ur image
if pixel pattern of "W" and "H" is located
it will locate "H" then look for closest "W" to it then save it to variable XW and YW which the "W" we need
since they are in same X , we only need math for "Y" one above is + 255 and the lower - 255
then to test it out i put mouse move to Y2
Code:
 begin
     if  Color.Pixel pattern can be located on screen("0,0,0,11,40,1,0,2,16,-37,0,0,3,12,41,0,0,0,12,-43,5,0,2", "0")
          and
          Color.Pixel pattern can be located on screen("0,0,2,-1,41,0,0,0,31,-20,0,0,0,1,-20,0,0,3,1,42,0,0,12,-32,-23,0,0,0", "0")
          begin
               Color.Wait for and locate pixel pattern("0,0,2,-1,41,0,0,0,31,-20,0,0,0,1,-20,0,0,3,1,42,0,0,12,-32,-23,0,0,0", "0", "XH", "YH")
               Color.Find pixel pattern closest to coordinate("0,0,0,11,40,1,0,2,16,-37,0,0,3,12,41,0,0,0,12,-43,5,0,2", "0", "no", "{XH}", "{YH}", "XW", "YW")
               Variable.Evaluate (Math)("{YW} - 255", "Y1")
               Variable.Evaluate (Math)("{YW} + 255", "Y2")
               Mouse.Move to coordinate("{XW}", "{Y2}")
          end
 end
Post Posted: Sun Sep 03, 2017 5:42 pm
  Post subject:  Re: Pixel Pattern - Find it on screen and save the coordinat  Reply with quote
GaNnOuT wrote:
if you can show me me wat u trying to do so i can understand u better


Its nothing that im trying to do especifcly...its just me having some fun on the program..

Let's say i have this 3 words like in the file...

I want the program to read the PIXELL PATTERN of one letter then i can make the pattern of all letters and use code to form some words and look for then, like with your code above...

In the image that i put is pretty simple cuz i already have the 3 words and im looking for example for the word WHILE...in this case..where they have the same background is ez to use "image" instead of "color'..but im already thinking in cases where the only thing in commom is the PIXELS of the letter since they is pretty strong and stay above the background ...

Like i said in the first post...let's say that i have a image saying WAIT..and another image saying WENT...another saying HEIGHT...i want to pick the pattern of W when he appears on the screen...then track where he is...and look for the letter next to him...in this case i will look for the pattern of H....then look next to the H for the pattern of I...then for the L then for the E, the only ┬┤problem is...what if the pattern for W..appears in 2 locations on screen ?! This code that you put will look in both at once ?


Attachments:
Trying.jpg
Trying.jpg [ 119.35 KiB | Viewed 1520 times ]
Post Posted: Sun Sep 03, 2017 6:27 am
  Post subject:  Re: Pixel Pattern - Find it on screen and save the coordinat  Reply with quote
if you can show me me wat u trying to do so i can understand u better
Post Posted: Sat Sep 02, 2017 4:03 am
  Post subject:  Re: Pixel Pattern - Find it on screen and save the coordinat  Reply with quote
Didnt know that had that fuction "wait and locate for pixel pattern" and man....i looked but didnt see UAHEaheaueha sorry...

So that's solve one problem...but if have like 2 identical pixel patterns?

What would happen?


Example: if im looking for "w" to form the word "went" but i have on screen "wait" and "while" the code will be able to look in both at once ?
Post Posted: Sat Sep 02, 2017 2:14 am
  Post subject:  Re: Pixel Pattern - Find it on screen and save the coordinat  Reply with quote
so like first one look for color pixel pattern then locate it then add more radius then look for the color pixel pattern at new cordinations?

Code:
if  Color.Pixel pattern can be located on screen("px pt", "10")
begin
  Color.Wait for and locate pixel pattern("px pt", "10", "X", "Y")
Variable.Evaluate (Math)("{X}+10", "X1")
Variable.Evaluate (Math)("{Y}+10", "Y1")
end
if  Color.Pixel pattern can be located on screen near coordinate("px pt", "10", "X1", "Y1", "10")


X and Y are the variables located for the pixel pattern then u add math to them which u should calculate with investigator like + 10
X1 and Y1 is the result and u look near them for color pixel pattern with 10 pixels radius of that location
Post Posted: Sat Sep 02, 2017 12:34 am
  Post subject:  Pixel Pattern - Find it on screen and save the coordinate.  Reply with quote
Hello there,

First i would like to apologize for any english errors.

Secondly, like in title im wanting to find a pixel pattern on screen and then save the coordinate on which i found him into a variable.
is there a way to do that?

More precisely, i have 2 images with a lot of words, and i wanting that the macro recognizes a third one...the problem is that i dont have a third image to pick the exact word and put it as a pattern..

So im wanting to pick the pixels patterns of letters and do a lot of "if" one inside another..the first one would find a letter on screen, i would pick the locations where the program found the letter and put it into a variable, so from the second one forward, i would look a pattern in a 10~20 pixels radius of that variables, get it? So that way i would be able to make my own words doing the pattern for each letter of the alphabet..

I dont know if there better way to do it...but that's the one that i could think of..but i have 2 problems:

1 - I dont know how to put the location that the programa find the pattern on variable.
2 - If have the pattern in more that one location on screen...so...what happens?


Thanks for any tips.. <3
Post Posted: Fri Sep 01, 2017 10:46 pm

All times are UTC


Jump to:  
cron


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