How can i write a pixel tool

12/25/2008 17:11 jens106#1
Hi,
i would like to know how i can write a nice tool that plays a sound when there is something changing in a certain range.
I hope you can create a tool or tell me how i can do that.
greets jens106
12/28/2008 02:44 NixIs#2
One of favroite program is AutoIT. Google for it. Its very nice. U need some days for learn to script with autoit. Its very easy if u have some exprience on programing. U can use for good thing or for bad thing "delete C:\" lol
12/28/2008 14:32 Loonatec420#3
yea autoIt is a good choice
here is the code you need:

---------------

Global $sound = @ScriptDir & '/mySong.mp3'

While (1)
; searches from 150, 200 to 300,400 for color white with a color diff range of 15 // pixel step = 5
$coords = PixelSearch (150, 200, 300,400, 0xFFFFFF, 15, 5)
if NOT @error = 1 then
SetError(2)
SoundPlay($sound)
Sleep(5000) ;length of sound in millli secs, so it won't loop :P
EndIf
WEnd


---------------

if you need more help let me know