Ejecting a cdrom.. 
Author Message
 Ejecting a cdrom..

Is it possible to eject a cdrom (or just open the cdrom drive) with rb?

thx,
 Danny Dikker



Sun, 19 Jan 2003 03:00:00 GMT  
 Ejecting a cdrom..
I thought this was an interesting question, so I tried to do it. The
following code works for *every* removable volume on a Macintosh, not just
cd-roms, though you have to know its name. I have no idea how to open the
cd-rom drive when there is no cd-rom loaded, neither can I guess the
purpose of doing this. ("Look mom, no hands!")

Nik

----------
Function putaway(volumename as string) As boolean
    dim ae as appleevent
    dim aeobj as appleeventobjectspecifier

    ae = newappleevent ("fndr", "ptwy","MACS")
    aeobj = getnamedobjectdescriptor ("cdis", nil, volumename)
    ae.objectspecifierparam("----") = aeobj

    return ae.send
end Function
----------

Quote:

> Is it possible to eject a cdrom (or just open the cdrom drive) with rb?

> thx,
>  Danny Dikker



Sun, 19 Jan 2003 03:00:00 GMT  
 Ejecting a cdrom..


Quote:
> I thought this was an interesting question, so I tried to do it. The
> following code works for *every* removable volume on a Macintosh, not just
> cd-roms, though you have to know its name. I have no idea how to open the
> cd-rom drive when there is no cd-rom loaded, neither can I guess the
> purpose of doing this. ("Look mom, no hands!")

> Nik

> ----------
> Function putaway(volumename as string) As boolean
> dim ae as appleevent
> dim aeobj as appleeventobjectspecifier

> ae = newappleevent ("fndr", "ptwy","MACS")
> aeobj = getnamedobjectdescriptor ("cdis", nil, volumename)
> ae.objectspecifierparam("----") = aeobj

> return ae.send
> end Function
> ----------


>> Is it possible to eject a cdrom (or just open the cdrom drive) with rb?

>> thx,
>> Danny Dikker

Nice, but "Danny Dikker" wants to know how to open the drive. (even if there
isen't a cdrom in the drive)

thx! ;)



Sun, 19 Jan 2003 03:00:00 GMT  
 Ejecting a cdrom..

Quote:

> Is it possible to eject a cdrom (or just open the cdrom drive) with rb?

Look for some toolbox calls or a XCMD to for CD-Audio which should have
things like an Eject or an OpenCD

Mfg
Christian

--
Gebrauchtwagenhaendler zum Familienvater: Schauns, kaufens Ihnen doch
glei an Reisebuss, man weiss doch nie ob Ihre Frau nicht wann mal
Zwoelflinge bekommen wird.
http://www.christians-software.de (Kostenlose Mac/Win Software)



Sun, 19 Jan 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. cdrom.py 1.0 - Linux SCSI CDROM class

2. Code for ejecting disks...

3. Ejecting a volume, problem

4. Unmount and/or eject a volume?

5. How to eject CD?

6. File in ejected driveā€¦

7. ejecting a CD programmatically?

8. Eject Volume/Medium

9. Eject Page

10. EJECT

11. Remove (disable) eject page in CW report

12. EJECT & Laser Printers

 

 
Powered by phpBB® Forum Software