gizmo123 Posted April 3, 2008 Share Posted April 3, 2008 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 More sharing options...
d4rk Posted April 3, 2008 Share Posted April 3, 2008 use PixelSearch() => http://www.autoitscript.com/autoit3/docs/f...PixelSearch.htm [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 More sharing options...
gizmo123 Posted April 3, 2008 Author Share Posted April 3, 2008 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 Link to comment Share on other sites More sharing options...
cppman Posted April 3, 2008 Share Posted April 3, 2008 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 Miva OS Project Link to comment Share on other sites More sharing options...
gizmo123 Posted April 3, 2008 Author Share Posted April 3, 2008 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 Link to comment Share on other sites More sharing options...
cppman Posted April 3, 2008 Share Posted April 3, 2008 (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 April 3, 2008 by cppman Miva OS Project Link to comment Share on other sites More sharing options...
gizmo123 Posted April 3, 2008 Author Share Posted April 3, 2008 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 Link to comment Share on other sites More sharing options...
gizmo123 Posted April 3, 2008 Author Share Posted April 3, 2008 thanks that what i was needing i just need to change it a little bit but thats it thanks so much Link to comment Share on other sites More sharing options...
gizmo123 Posted April 3, 2008 Author Share Posted April 3, 2008 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 Link to comment Share on other sites More sharing options...
cppman Posted April 3, 2008 Share Posted April 3, 2008 (edited) Np. Unfortunately, I am the wrong person to be asking, because I am not sure how. Edited April 3, 2008 by cppman Miva OS Project Link to comment Share on other sites More sharing options...
gizmo123 Posted April 3, 2008 Author Share Posted April 3, 2008 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? Link to comment Share on other sites More sharing options...
gizmo123 Posted April 3, 2008 Author Share Posted April 3, 2008 this is what i have how come its not doing the same thing as the one i just got? Link to comment Share on other sites More sharing options...
gizmo123 Posted April 3, 2008 Author Share Posted April 3, 2008 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 Link to comment Share on other sites More sharing options...
d4rk Posted April 3, 2008 Share Posted April 3, 2008 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 scritpuse 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now