SRL Archive - General

Need a program that works on other client


Zeta Matt

2012-10-19 15:57:51

I haven't used simba for like 1 year, and forgot some things of programming, so I'm having issues on doing this program I want.

I want a program that will play a sound whenever a pre-defined color is detected, something like this:

Function DetectChat:
begin
if findcolortolerance(16711680,627,731,1071,674) then
playsound('c:/simba/alarm.wav');
end;

I think it's an easy program to make, just need a procedure and a function, but I forgot everything, so if someone could help me please, I thank you in advance =)

Footy

2012-10-19 16:07:28

program new;
{$i srl/srl.simba}

Procedure Playsound;
var
x, y:integer;
begin
if findcolortolerance(x, y, color, xs, ys, xe, ye, 5) then
playsound('File Path');
end;



begin
SetupSRL
repeat
Playsound
until(false);
end.

Like this?

Zeta Matt

2012-10-19 16:39:16

It's exactly what I want!!!!!! Thank you very much! Something went wrong, tough, it is playing sound every time, even if the color I want isnt on the screen =(