Sign in to follow this  
Followers 0
Pandacyber

Pixel color click

11 posts in this topic

How can i reconfigure this to find a specific color on the screen. 

#include <MsgBoxConstants.au3>

; Find a pure red pixel in the range 0,0-20,300
Local $aCoord = PixelSearch(0, 0, 20, 300, 0xFF0000)
If Not @error Then
    MsgBox($MB_SYSTEMMODAL, "", "X and Y are: " & $aCoord[0] & "," & $aCoord[1])
EndIf

Share this post


Link to post
Share on other sites



What exactly are you trying to do with the color on the screen? Click it, just show that it exists, etc.? Please explain in detail what you're trying to do, and perhaps a screenshot of the image you're trying to get the color of. Help us help you ;)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

I am trying to make it so that the mouse will move to the desired color and click it

Share this post


Link to post
Share on other sites

So basically, i want it to locate,move,then click the color i have there. however this is a different language of coding and needs to be remodified i beleive. so was just wondering how i can do this

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

While GetKeyState("P")

{

PixelSearch, Px, Py, 457, 364, 548, 455, 0xAD52AD, 3, fast 

if ErrorLevel = 0

    {

        MouseMove, %Px%, %Py%

        Click 

        Sleep, 25

        Send("{LCTRL}") 

        Sleep, 60000

    }

}

return

 

Would this work to find the color then click on it and hit left control?

Edited by Pandacyber

Share this post


Link to post
Share on other sites

What exactly are you trying to do with the color on the screen? Click it, just show that it exists, etc.? Please explain in detail what you're trying to do, and perhaps a screenshot of the image you're trying to get the color of. Help us help you ;)

lets ask this again for we think you are not getting what we are asking Pandacyber. We know WHAT you want to do. What we want to know is this:

What is the name of the application you are trying to automate?

Share this post


Link to post
Share on other sites

i guess it is c# pixel search. i would like the file to be run like that as a script through my autoit if possible

Share this post


Link to post
Share on other sites

You're avoiding the question on purpose. Good way to get the thread locked.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

i guess it is c# pixel search. i would like the file to be run like that as a script through my autoit if possible

Third time - The name of the application you want to automate please? You are at the point a screenshot will be needed. Any avoidance in answering this question will draw the attention of a moderator and you will have to answer this question to them.

BTW - let me tell you how this will play out - If you avoid answering the question at best theis thread gets locked. At worst you get banned. I've been here 10 years and seen many people try to do the question avoidance game. They all have lost in playing that game. Feel free to see how they played the game by looking here.

Now if you don't know the forum rules, look here.

Share this post


Link to post
Share on other sites

i dont understandthe question. thismight be the answer:

trying to get it to work on a mmo game i play. i want it to justclick on the color whenin game.

Share this post


Link to post
Share on other sites

Pandacyber,

 

trying to get it to work on a mmo game i play

You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing game automation - before you post again. :naughty:

M23

2 people like this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0