Sign in to follow this  
Followers 0
pezo89

Pixelsearch - Find And then Click

11 posts in this topic

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

Share this post


Link to post
Share on other sites



Why dont you just look for the pixel 100 to the left or right instaed of looking for the wrong pixel?


Share this post


Link to post
Share on other sites

MouseClick("left",$pixelSearch[0]+100,$pixelSearch[1],1,5)

?

Share this post


Link to post
Share on other sites

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 =)

Share this post


Link to post
Share on other sites

yea spose so did u try authenticitys way? did it work?


Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by pezo89

Share this post


Link to post
Share on other sites

ok what is it an applicatin or a web page? would ctrlclickcords be better?

what is the app or web page?


Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by zac23

Share this post


Link to post
Share on other sites

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?

No need, figured out a way =)

Thx for the help btw:)

Share this post


Link to post
Share on other sites

ok no probs


Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0