Ruby Challenge!
-
OBFUSCATORS! You should be trying to make it MORE readable, not less! (switch to high, crackly voice) You young punks don't know how good you've got it! Why, back in my day, all we had was ones and zeros. And sometimes we didn't even have zeros, and we had to use the letter O!
-
@rickw said:
Too late for deadline, but a shorter (77 characters) solution:
i=0;Dir["C:/WINDOWS/Media/*"].each{|f|UI.play_sound f;puts [i+=1,f];sleep(3)}
If anyone can reduce it from here, please post and enlighten us all
i=0;Dir["/WINDOWS/Media/*"].map{|f|UI.play_sound f;p i+=1,f;sleep 3}
That would be 68?
-
Nice job Jim!
Clark, that was too funny
-
Tweaking Jim's..
i=0;Dir["/*/Media/*v"].map{|f|UI.play_sound f;p i+=1,f;sleep 3}
That would be 63... AND it only plays wav files, not falling over on midi's etc... (62 otherwise)
-
@tig said:
Tweaking Jim's..
i=0;Dir["/*/Media/*v"].map{|f|UI.play_sound f;p i+=1,f;sleep 3}
That would be 63... AND it only plays wav files, not falling over on midi's etc... (62 otherwise)
Alright TIG!
A note about using Dir[""]: I didn't specify a file ending because I have files that end in .WAV. These files do not get played because they end in capital letters. The shortest way to get ALL the files was o use *.
-
hmm... the last two solutions won't play on my machine.
-
-
interesting this stuff does anyone know how to stop a file from playing in UI
-
rombout look here - stopping UI.play_sound ? -
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=10352&p=68452#p68452 -
yeah i already knew that one. But thanx anyway, did you already found different solution
Advertisement