Jump to content

Recommended Posts

Posted

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

Posted

[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

Posted

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

Posted

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

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
Posted

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

Posted

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

Posted
:) 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?
Posted

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

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
×
×
  • Create New...