Sign in to follow this  
Followers 0
Krackin

Pixel Snap And Hold?

7 posts in this topic

#1 ·  Posted (edited)

What Im Looking To Do Is Get A Script that will snap to a color within a set distance away from the center of the screen is it possible?

it's for an fps i want it to search by my crosshair then snap to the closest set color and stick to it until the key is pressed again

PixelSearch ( 482,384, 512,354, 542,384, 512,414, 247,247,0? <- is that right? those are the screen pos and the rgb color of the yellow i need

Edited by Krackin

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

look @ pixelsearch, mousemove in the helpfile.

okay thx for the tip you wouldnt happen to have a link on the basic setup of auto it and the setup for a script or somthing would you?

Edited by Krackin

Share this post


Link to post
Share on other sites

@Krackin

For the distance use :

Local $last_pos[3], $lastdistance

While 1
    $current_pos = MouseGetPos()
    $distance = Sqrt(($current_pos[0] - $last_pos[0]) ^ 2 + ($current_pos[1] - $last_pos[1]) ^ 2)
    $mousedist = $distance + $lastdistance
    $lastdistance = $mousedist
    $last_pos = $current_pos
    TrayTip('Mouse dist (pixels)', $mousedist, 0, 1)
WEnd

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

first of all, what is the colour your searching for.? i know YELLOW. but you need the Colour value of pixel to find (in decimal or hex)....

also, the coordinates you gave, are they...

482,384

512,354

542,384

512,414

247,247

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

first of all, what is the colour your searching for.? i know YELLOW. but you need the Colour value of pixel to find (in decimal or hex)....

also, the coordinates you gave, are they...

482,384

512,354

542,384

512,414

247,247

That yellow

Posted Image

Edited by Krackin

Share this post


Link to post
Share on other sites

Bump :)

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