This is probably a case study in why i shouldn't have internet access when I get bored.
Just make sure you enable API calls in SCAR. Laugh in triumph as your hapless victim switches off his speakers only to find that the sound is coming from inside the computer!
SCAR Code:
program Beep;
//Enable Script > Allow API Calls for this to work
//Range of freq is 37 (strange clicking/whirring noise) to 32767 (inaudible, only hear clicking of speaker)
//the most annoying one is about 14000 - 15000
//time setting is self-explanatory
function Beep(freq, dur : LongInt):boolean; external 'Beep@Kernel32.dll stdcall';
var
i : integer;
Begin
GetSelf.hide;
repeat
//confusion mode
writeln(booltostr(Beep(RandomRange(37, 32767), RandomRange(500, 750))));
//annoyance mode (use with care ;] )
//writeln(booltostr(Beep(14500, 2000)));
i := i + 1;
until(i = 5);
GetSelf.Show;
End.