Page 1 of 1
Pixel change alert
Posted: May 20th, 2005, 3:52 am
by tault_loraik
I can't get my version to work right and am in need of a quick fix, can anyone toss together a pixel script where you choose a pixel, and if that pixel changes to a different color you get an autio aleart? Any help would be greatly appreciated.
Posted: May 20th, 2005, 7:15 am
by tault_akanon
Quick and dirty code:
ACTool code
Code: Register to unlock hidden link
Contants
SampleX=20
SampleY=20
SampleR=0
SampleG=0
SampleB=0
SoundToPlay=C:\Windows\startup.wav
End
LoadRGB $SampleX,$SampleY
SetConst SampleR = {RGBRED}
SetConst SampleG = {RGBGREEN}
SetConst SampleB = {RGBBLUE}
While 1=1
Call CheckForChangedPixel
End
Procedure CheckForChangedPixel
LoadRGB $SampleX, $SampleY
If Not($Sample$ = {RGBRED}) AND Not($SampelG = {RGBGREEN}) AND Not($SampleB = {RGBBLUE}) Then
PlaySound $SoundToPlay
End
I wasn't too sure about the Not = syntax and Playsound, and I dont have a copy of ACTool here at work to verify that that's the correct context, but it should mostly work.
Posted: May 20th, 2005, 9:49 am
by tault_loraik
tks man, will give it a shot tonight
Posted: May 20th, 2005, 12:38 pm
by tault_loraik
Hmm gets hung up at first END statement, says too many END statememts.. I have never used ACTools before but I assume you copy it into body area and hit "start"?
Posted: May 25th, 2005, 6:15 pm
by tault_loraik
NM
Posted: May 26th, 2005, 1:57 am
by tault_discoduck
RoI=? Im not sure what your trying to do since I don't know what RoI means (return on investment), but I'm pretty sure I have a solution for what you want to do. Post what RoI is, or IM me.