Sign in to follow this  
Followers 0
gizmo123

pixel help

14 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

ok but how does that help me? thats looking for a pixel of that color? im wanting me to slect a pixel and if the colr changes do something

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

yay ok but thats 1,1 how do i set it to where i can just put my mouse over it and click or press a key so it watch the mousepos

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

ok im wanting it to look at the pixel that i choose with my mouse (mousepos) or some thing like that so insead of thare being a set [1,1] it can chage if i pick a dif spot

Share this post


Link to post
Share on other sites

thanks that what i was needing i just need to change it a little bit but thats it thanks so much

Share this post


Link to post
Share on other sites

hey umm sry again but how can i have it to where that pixel that i picked it can change its shade like forma yellowish color to a neon green right now its way to picky lol

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Np. Unfortunately, I am the wrong person to be asking, because I am not sure how.

Edited by cppman

Share this post


Link to post
Share on other sites
:) well up til just then you where my hero lol i know what color it is going to change to. is thare any way i can put that in thare ? if the pixel i pick changes to the color i said it does the rest of the script?

Share this post


Link to post
Share on other sites

this is what i have how come its not doing the same thing as the one i just got?

Share this post


Link to post
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

Share this post


Link to post
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

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