Is this what you want?? i dont really see how this could be that useful. what is it for?
Code:
program New;
var
x, y, WaitTime : Integer;
Procedure FindTheColor;
begin
repeat
if FindColorTolerance(x, y, 7565938, 260, 157, 260, 168, 10) then exit;
until(false);
end;
Procedure UserInput;
var i: Integer;
begin
repeat
for i := 1 to 4 do
if IsFKeyDown(i) then
begin
if i = 1 then waitTime := 8;
if i = 2 then waitTime := 12;
if i = 3 then waitTime := 23;
if i = 4 then waitTime := 42;
exit;
end;
until(false);
end;
Procedure WaitThenType;
begin
wait(waitTime*1000);
SendKeysSilent('s');
//SendKeysSilent(chr(13)); //if you want it to press enter, then enable this line.
end;
begin
repeat
FindTheColor;
UserInput;
WaitThenType;
until(false); // Until what you want.
end.