|
Answer» Old age.....i had it somewhere.....and now after**** years i decide to use it......but can remember the script..long script....is all i can give you.Merlin,
This script will EJECT a CD:
Code: [Select] Dim WMP: Set WMP = CreateObject("WMPlayer.OCX") Dim CDROMs: Set CDROMs = WMP.cdromCollection
'If CDROMs.Count >= 1 Then ' For i = 0 to CDROMs.Count - 1 CDROMs.Item(0).Eject ' Next 'End If
Set WMP = Nothing Set CDROMs = Nothing WScript.Quit
The above script will eject the first CD it FINDS. Make changes if you have more than one. If you uncomment the lines marked ' , all the CD drives will pop open.
As for playing a CD, just execute the PROGRAM that created the file. Most applications allow a command line argument for opening a file when the app is loaded.
Hope this HELPS. Thanks SIDEWINDER.......i will execute it when i get a chance.
Jul 22nd, 2005, 3:15pm
update: Code works ok......nice one! seemed shorter t then the one i had!
|