pezo89 Posted May 21, 2009 Posted May 21, 2009 Hey guys, just wonderd how u can locate a pixel in a spesific "frame", then have it mouseclick abit to the left of that spot for example $pixelSearch=PixelSearch(1198, 224, 1215, 475, 12588052 );Search the pixelcolor => Start at 0pixel by 0pixel and finish at your DesktopWidth by DesktopHeight ToolTip('Script is "Autotarget kjører"',0, 40) If IsArray($pixelSearch)=1 Then;If the pixel color has been found then send ("{CTRLdown}") sleep ("200") MouseClick("left",$pixelSearch[0],$pixelSearch[1],1,5);Click with left mouse at pixelfound position (with 0 speed = MAX) sleep ("200") send ("{CTRLup}") sleep ("10000") EndIf WEnd that code was one i wrote with some help of this forum, but how can i get it to not click @ the exact pixel, but for instance 100 to the right, or to the left, this spot shifts by itself, so normal X & Y cords do not work however the space between the color and the spot i need to have clicked is always the same
zac23 Posted May 21, 2009 Posted May 21, 2009 Why dont you just look for the pixel 100 to the left or right instaed of looking for the wrong pixel?
Authenticity Posted May 21, 2009 Posted May 21, 2009 MouseClick("left",$pixelSearch[0]+100,$pixelSearch[1],1,5) ?
pezo89 Posted May 21, 2009 Author Posted May 21, 2009 Why dont you just look for the pixel 100 to the left or right instaed of looking for the wrong pixel?becouse on either side it is all white, so kinda hard to "lock" onto a pixel there =)
pezo89 Posted May 21, 2009 Author Posted May 21, 2009 (edited) yea spose so did u try authenticitys way? did it work?Yes, i have tried it, however it still mouseclicks at the same location the pixel is, i need it to click in a white selection circle in a white frame. the prob is that i cant locate it with either black or white pixels, as there is to much on the site for it, and as the frame moves around abit it is also abit dodgy =(note: it is only like this far (Box)<--->(Pixel) thats pretty much relative distance between them, so i need it just to go a tad to the left Edited May 21, 2009 by pezo89
zac23 Posted May 21, 2009 Posted May 21, 2009 ok what is it an applicatin or a web page? would ctrlclickcords be better? what is the app or web page?
pezo89 Posted May 21, 2009 Author Posted May 21, 2009 ok what is it an applicatin or a web page? would ctrlclickcords be better?what is the app or web page?It is a Website, well, as far as i know, all cordinates won't work, due to the clickable "window", is moving around every now and then
zac23 Posted May 21, 2009 Posted May 21, 2009 (edited) still u should be able to capture it with winactvate and then tell mouse click to click the apropiate cord in the window edit: gonna link us to the webpage and post your code so far? Edited May 21, 2009 by zac23
pezo89 Posted May 21, 2009 Author Posted May 21, 2009 still u should be able to capture it with winactvate and then tell mouse click to click the apropiate cord in the windowedit: gonna link us to the webpage and post your code so far?No need, figured out a way =) Thx for the help btw:)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now