i'd like to script a small thing that check if there's any audio media in the dvd-drive, and if so, it randomly play some of that media; elsewhere plays a predefined playlist of music into the hdd.
can you please point me somewhere so i could know how to start?
Autoplay this IF and this other ELSEWHERE
Joined: Oct 2003
2004-07-18 17:45 Post: #1
Skilled Python Coder
Joined: Jun 2004
Location: Oklahoma City, OK
2004-07-18 22:32 Post: #2
you can find most of the information you need in this thread. then again, you may've already read through that one.
on first consideration, it might be kinda tricky to detect if the dvd drive contains an audio cd. it'd be fairly easy to do a contents = os.listdir("d:\") to find out what's in it, and then you'd just have to write a check to see if contents looks like a bunch of audio files (and, if so, play them).
that would really be the only deviation from the scripts above. give it a try, and of course ask back here if you have any problems.
For scripts, script development tools, and documentation, visit my website: