Jump to content

pixel help


Recommended Posts

ok ive been trying to get the program to look at a pixel that i choose and if that pixel changes color it clicks on a spot that i choose or send some txt?

ive had people send me thing that are like this but it all looks like jiberish all i have done so far by my self is mousemove,mouseclick,drag send ("{enter}") the vary simple stuff can any one help me

Link to comment
Share on other sites

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
Share on other sites

Global $nPixelLocation[2] = [1,1]
Global $nOldPixelColor = PixelGetColor($nPixelLocation[0], $nPixelLocation[1])

While (true)
    Sleep(50)
    $nPixelColor = PixelGetColor($nPixelLocation[0], $nPixelLocation[1])
    if ($nPixelColor <> $nOldPixelColor) Then
        $nOldPixelColor = $nPixelColor
        PixelColorChanged()
    EndIf
WEnd

Func PixelColorChanged()
    MsgBox(0, "", "Oh NO!!")
EndFunc

Link to comment
Share on other sites

Are you asking to just get the color of the pixel under the mouse, or make it so the position ($nPixelLocation) is changed to the mouse position when a key is pressed?

Here is how you do the latter(press F4 to set the x,y coordinates to the mouse position):

HotKeySet("{F4}", "SetPixelLocation")

; First we declare the location of the pixel whose color we want to "monitor". [0] = x, [1] = y.
Global $nPixelLocation[2] = [1,1]


; Then we get the default value for that location.
Global $nOldPixelColor = PixelGetColor($nPixelLocation[0], $nPixelLocation[1])

; Loop forever
While (true)
    Sleep(50)
    
    ; Get the new pixel color at that location
    $nPixelColor = PixelGetColor($nPixelLocation[0], $nPixelLocation[1])
    
    ; If the original color value doesn't match the new color value, then...
    if ($nPixelColor <> $nOldPixelColor) Then
        ; ... assign the new color value to the old color variable, and then...
        $nOldPixelColor = $nPixelColor
        
        ; ... call the PixelColorChanged function.
        PixelColorChanged()
    EndIf
WEnd

Func PixelColorChanged()
    MsgBox(0, "", "Oh NO!!")
EndFunc

Func SetPixelLocation()
    $nPixelLocation = MouseGetPos()
EndFunc
Edited by cppman
Link to comment
Share on other sites

i know the decmial color and hex color how do i make it to where when that color is in the spot i chose it does the scritp

use a conditional statement

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

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...