Haagimus 0 Posted November 2, 2010 so here is the quick and dirty. i have a movie collection with almost 1400 movies in a folder. im looking for some help writing a script/program that will randomly select any movie out of this folder and then play the file in VLC media player. i know this isnt an impossible feat as i have successfully written the exact script to do this in my Linux partition, i want a version to do this in windows as well though because i flip flop between linux and windows frequently due to program compatability issues in linux. i also would in addition just like to learn how to write a program like this in windows as well. here is my script from my linux build cd '/media/2TB Media/01. Movies' set -- * length=$# m=$(( $RANDOM % ($length + 1) )) vlc --one-instance --volume 1024 "${!m}" exit 0 now i dont know if i could just input this with a corrected directory structure for my windows build in AutoIT and compile a program. any help or suggestions AT ALL would be greatly appreciated. Share this post Link to post Share on other sites
enaiman 16 Posted November 2, 2010 _FileListToArray - to get all your movie names into an array Random - to get a number between 1 and the maximum number of elements Play array element number (the one generated by Random function) That sould get you well started. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example scriptwannabe "Unbeatable" Tic-Tac-ToePaper-Scissor-Rock ... try to beat it anyway :) Share this post Link to post Share on other sites
AdmiralAlkex 125 Posted November 2, 2010 And Run() to run VLC. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
Haagimus 0 Posted November 2, 2010 sweet thanks guys ill give that a try tonight when i get off work and let you know if its functional. Share this post Link to post Share on other sites
Haagimus 0 Posted November 3, 2010 (edited) ended up getting this program working fine, still need to add functionality to be able to read files in a subdirectory, right now can only read files in the main directory. ill post the final product and source in a couple days when i get a chance. im open to any suggestions or improvements anybody may have after they check it out Edited November 24, 2010 by Haagimus Share this post Link to post Share on other sites