Haagimus Posted November 2, 2010 Share 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. Link to comment Share on other sites More sharing options...
enaiman Posted November 2, 2010 Share 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 script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 2, 2010 Share 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 Link to comment Share on other sites More sharing options...
Haagimus Posted November 2, 2010 Author Share 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. Link to comment Share on other sites More sharing options...
Haagimus Posted November 3, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now