Jump to content

pixel click


Recommended Posts

hello people of the autoit forums,

i downloaded autoit and im amazed of what i can do with it,

i allready have made a pixel searcher but now i'd like to know how to make it click the color?

i allready looked at the help files but it only shows me how to click/drag a coordinate not a color...

so like when i see a color it auto detects and clicks it so i dont have to put the coordinates inside

somebody has allready made something like it but id like to make my own.....

ill put an attachment with the script he made in au3 format.......

thanks in advance,

dragonheard.

Link to comment
Share on other sites

  • Moderators

dragonheard,

Welcome to the AutoIt forum. :)

i allready have made a pixel searcher

How does your pixel searcher know it has found the right pixel? Can it not tell you where it is? :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

dragonheard,

Welcome to the AutoIt forum. :)

How does your pixel searcher know it has found the right pixel? Can it not tell you where it is? :)

M23

yeah it tells me the x/y of the color but i dont want it to say it but auto click it while scanning

so it auto detects the spot and automatically clicks on the spot so i dont need the coords

Link to comment
Share on other sites

dragonheard,

Welcome to the AutoIt forum. :)

How does your pixel searcher know it has found the right pixel? Can it not tell you where it is? :)

M23

thanks =D

but i want it to auto click it when seen so when detecting it clicks the color i dont want it to tell the coordinates as colors can move....

Link to comment
Share on other sites

Simple:

$PixelLoc = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $vHexColor)
;MsgBox(0, "", $PixelLoc[0] & ":" & $PixelLoc[1])
If Not @error Then
    MouseClick("primary", $PixelLoc[0], $PixelLoc[1])
EndIf
Link to comment
Share on other sites

Simple:

$PixelLoc = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $vHexColor)
;MsgBox(0, "", $PixelLoc[0] & ":" & $PixelLoc[1])
If Not @error Then
    MouseClick("primary", $PixelLoc[0], $PixelLoc[1])
EndIf

but than ill still need the coords?
Link to comment
Share on other sites

$PixelLoc = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $vHexColor)

;MsgBox(0, "", $PixelLoc[0] & ":" & $PixelLoc[1])

If Not @error Then

MouseClick("primary", $PixelLoc[0], $PixelLoc[1])

EndIf

What is it exactly, that you think they are?

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

$PixelLoc = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $vHexColor)

;MsgBox(0, "", $PixelLoc[0] & ":" & $PixelLoc[1])

If Not @error Then

MouseClick("primary", $PixelLoc[0], $PixelLoc[1])

EndIf

What is it exactly, that you think they are?

im very very sorry..

i thought i still needed to put in the coords.

THANKS anyway!

Link to comment
Share on other sites

COOL IT NOW WORKS WELL

but now i have to reboot my comp to stop it..

could someone please tell me the easy way to add a hotkey?

Try looking in the help file at HotKeySet you might even find an example there


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Just put it in a function and use HotKeySet() :)

edit: lol, posting same time :)

Edited by AppTux
PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

Just put it in a function and use HotKeySet() :)

edit: lol, posting same time :)

thanks it works but in games it makes me die.....

and the "togglepause" doesnt work,,

if i say he has to click blue he gets all colors of my screen so i keep dieing....

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...