Insert Random Jingle for mAirlist 2.x convert to mairlist 3.x

Hi everybody.
I’m using this script since a while on mAirlist 2.x.

[code]{to insert more files simply do this 4 tasks
#1. extend the array
#2. pfad[id] := ‘pfad’ add new path and filename
#3. rise the number at Random (*)
#5. fertig
}

var i : Integer;
ts: TStringList;
pfad: Array[0…5] of string;
begin
pfad[0] := ‘C:\blabla.mp3’;
pfad[1] := ‘C:\aaa.mp3’;
pfad[2] := ‘C:\bbb.mp3’;
pfad[3] := ‘C:\ccc.mp3’;
pfad[4] := ‘C:\neu.mp3’;
pfad[5] := ‘C:\neu2.mp3’;
i := Random(5);
CurrentPlaylist.InsertFile(0, pfad[i], eaNone);
end.
[/code]
can anybody help me converting this to make it running on mAirlist 3.x?
By the way, I didn’t ever make it run with more than 10 files (0-9) that would be a fancy new feature.
EDIT: originally it comes from here
http://forum.mairlist.com/index.php/topic,1916.msg10869.html#msg10869

hey shorty.xs,

simply let out the third parameter at the function call “InsertFile”).
now it sohould work.

[code]{to insert more files simply do this 4 tasks
#1. extend the array
#2. pfad[id] := ‘pfad’ add new path and filename
#3. rise the number at Random (*)
#5. fertig
}

var i : Integer;
ts: TStringList;
pfad: Array[0…5] of string;
begin
pfad[0] := ‘C:\blabla.mp3’;
pfad[1] := ‘C:\aaa.mp3’;
pfad[2] := ‘C:\bbb.mp3’;
pfad[3] := ‘C:\ccc.mp3’;
pfad[4] := ‘C:\neu.mp3’;
pfad[5] := ‘C:\neu2.mp3’;
i := Random(5);
CurrentPlaylist.InsertFile(0, pfad[i]);
end. [/code]

michi