Okay, here are the results, sorted by order of submission, path-coded for Windows XP:
@rickw said:
147 characters, 5 semicolons
(f=Dir["C;/Windows/Media/*.wav"]).sort!;i=0;t=UI.start_timer(3,true){puts "#{i}; #{f[i]}";UI.play_sound(f[i]);i+=1;UI.stop_timer(t) if i>=f.length}
@unknownuser said:
110 characters, 5 semicolons
fn=0;d="c;/Windows/Media";Dir.foreach(d){|s| fn+=1;UI.play_sound(File.join(d,s));puts "#{fn}; #{s}";sleep(2)}
@tig said:
114 characters, 2 semicolons
Dir.chdir(d="C;/WINDOWS/Media/");(c=Dir['*.wav']).each{|w|UI.play_sound(d+w);UI.inputbox([w],[c.index(w).to_s],d)}
>
@jim said:
258 characters, 18 semicolons
@f=Dir["c;/windows/media/*"];def b(i);io=open(i,"rb");io.pos=28;b=io.read(4);io.close;b.unpack("i")[0].to_f;end;def j;t=0;@f.each_with_index{|s,i|;UI.start_timer(t){;Sketchup.set_status_text"#{i+1};#{s}";UI.play_sound(s);};t+=(File.stat(s).size/b(s));};end;j
>
Kudos to Thicket for the shortest code!
Honorable mention to TIG for second-shortest by 4 characters.
Kudos to Jim for checking the filesize to get the delay time!
Kudos to TIG for a really clever way of presenting the track info and avoiding both sound overlaps and system sound intrusion!
Now, for the follow-up challenge:
Create the jukebox with less than 100 characters! Entries due by noon (GMT-6) on Monday, 6 August 2007. Short challenge, but the hard work's been done