Hi all,
was on the forum last night finding out why my Eject if no
cd in drive functions would not work. My new problem is
that if there is a Cd in one of the drive then don't eject the other
one.
The only trouble is that Drive.GetInformation will return a nil value
when looking at an emtpy CD-Rom Drive, but thats fine!
How would i go about comparing to see if both drives == nil!
Here the code:
tDrives = Drive.Enumerate();
for index in tDrives do
nDriveType = Drive.GetType(tDrives[index]);
if nDriveType == 5 then
tDriveInformation = Drive.GetInformation(tDrives[index]);
if tDriveInformation == nil and nil then -- it works with one (nil) but ejects
-- The other drive, i need them to
-- be both empty before ejecting!
Drive.Eject(tDrives[index]);
else
Dialog.Message("Disc in Drive", "A disc in 1 of the Drives", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
end
end
i thought the : nil and nil - would be good comparison, but it dosen't work.
As always, Thanks in advanced for looking!
mdxafx.

