Good Day...
Was wonder if anyone knew of a way to control a computers CD/DVD drive door? We need a way to open and close the door on the drives remotely, we can handle the remotely part, but not the opening and closing part (in live code).
It is for use in Elementary schools with PC's. (We handle it on Macs through ARD).
~David
Controlling the door of a CD/DVD drive
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Controlling the door of a CD/DVD drive
Hi David,
There's no LiveCode command to directly control a cd tray, however...
you can use vbScript.
Place a button.
Add this to the mouseUp
on mouseUp
do the cOpenTray of me as "vbScript"
end mouseUp
Create a Custom Property for the button named cOpenTray
Put this in the Custom Property Contents
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
For i = 0 To colCDROMs.count-1
colCDROMs.item(i).eject
Next
oWMP.close
Only tested on XP.
There's no LiveCode command to directly control a cd tray, however...
you can use vbScript.

Place a button.
Add this to the mouseUp
on mouseUp
do the cOpenTray of me as "vbScript"
end mouseUp
Create a Custom Property for the button named cOpenTray
Put this in the Custom Property Contents
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
For i = 0 To colCDROMs.count-1
colCDROMs.item(i).eject
Next
oWMP.close
Only tested on XP.
Andy .... LC CLASSIC ROCKS!