Autoplay this IF and this other ELSEWHERE

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
febs Offline
Senior Member
Posts: 199
Joined: Oct 2003
Reputation: 0
Post: #1
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?

thanx Frown
find quote
Alexpoet Offline
Skilled Python Coder
Posts: 172
Joined: Jun 2004
Reputation: 0
Location: Oklahoma City, OK
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:
find quote