Jump to content
Sign in to follow this  
Garrett19212

find pixel in view and do action

Recommended Posts

Garrett19212

i want it to search for a pixel on the screen and if it finds it i want it to move the mouse to where the pixel is and left click 2 times on the pixel.

Is that possible?

Share this post


Link to post
Share on other sites
Blue_Drache

i want it to search for a pixel on the screen and if it finds it i want it to move the mouse to where the pixel is and left click 2 times on the pixel.

Is that possible?

<{POST_SNAPBACK}>

Pixelsearch()

Mouseclick()

Happy researching


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites
Garrett19212

i searched and i couldnt find anything that would work... can i have an example on how to search for a pixel on the whole screen and if it find its it clicks on the pixel twice, and if it doesn't find it it loops the search over and over, and if it does find it it still searches for it over and over

Share this post


Link to post
Share on other sites
Garrett19212

thx i was wondering how to get to that page :)

Share this post


Link to post
Share on other sites
Garrett19212

While 1

$coord = PixelSearch( 0, 0, 20, 300, 0x170F0B, 10 )

If Not @error Then

MouseClick ( "left" [, $coord[0], $coord[1] [, 2 [, 10 ]]] )

EndIf

WEnd

Ok thats my script now how do i make it search the whole screen?

Share this post


Link to post
Share on other sites
therks

Supply the size of your screen (Look at the @Desktop macros) to PixelSearch of course. Also, your MouseClick function is messy. You don't need all those [ and ] in there, only the ones after the $coord variables.

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  

×