witam wszystkich...i od razu do rzeczy : programuje w Turbo Pascalu 7.0 i chcem napisac program który wysuwa tacke od cd-romu kiedy nacisne jakis tam przycisk...mam program (gotowy , sciągnięty z jakiejs tam strony) ale jest problem :
Program CDROMCOM;
Uses CDROM;
Var B : Boolean;
Procedure Help;
Begin
Writeln ('Usage CDROMCOM <command> where command is');
Writeln (' p for play');
Writeln (' s for stop');
Writeln (' o for open tray');
Writeln (' c for close tray');
Writeln (' i for time/track info');
End;
Procedure CDopen;
Begin
Writeln('Opening CD player...');
B:= CDEject;
End;
Procedure CDclose;
Begin
Writeln('Closing CD player...');
B:= CDCloseTray;
End;
Procedure StopCD;
Begin
Writeln('CD stopped.');
B:= CDStop;
End;
Procedure CDshowinfo;
Var Posinf : CDPosType;
Temp : string;
Begin
B:= cdgetpos(posinf);
str(posinf.sec, temp);
if posinf.sec < 10 then temp := '0' + temp;
Writeln('Track : ',Posinf.Track:2,' - Time : ',posinf.min:2,':',temp);
str(posinf.dsec, temp);
if posinf.dsec < 10 then temp := '0' + temp;
Writeln('Played total time : ',posinf.dmin:2,':',temp);
end;
Procedure CDplay;
var Len : longint;
inf : CDInfoRecord;
Posinf : CDPosType;
T : byte;
Begin
Writeln('Playing CD ...');
T:= 1;
B:= CDPlayAudio(T,$FFFFFFF);
cdshowinfo;
End;
i przy kompilowaniu jest : File not found <CDROM.TPU>
mam tez moduł do obslugi cd-romu ale on tez nie dziala
co jest nie tak ? moze ktos ma prostszy sposób na "wysunięcie tacki" ??
pozdrawiam
Program CDROMCOM;
Uses CDROM;
Var B : Boolean;
Procedure Help;
Begin
Writeln ('Usage CDROMCOM <command> where command is');
Writeln (' p for play');
Writeln (' s for stop');
Writeln (' o for open tray');
Writeln (' c for close tray');
Writeln (' i for time/track info');
End;
Procedure CDopen;
Begin
Writeln('Opening CD player...');
B:= CDEject;
End;
Procedure CDclose;
Begin
Writeln('Closing CD player...');
B:= CDCloseTray;
End;
Procedure StopCD;
Begin
Writeln('CD stopped.');
B:= CDStop;
End;
Procedure CDshowinfo;
Var Posinf : CDPosType;
Temp : string;
Begin
B:= cdgetpos(posinf);
str(posinf.sec, temp);
if posinf.sec < 10 then temp := '0' + temp;
Writeln('Track : ',Posinf.Track:2,' - Time : ',posinf.min:2,':',temp);
str(posinf.dsec, temp);
if posinf.dsec < 10 then temp := '0' + temp;
Writeln('Played total time : ',posinf.dmin:2,':',temp);
end;
Procedure CDplay;
var Len : longint;
inf : CDInfoRecord;
Posinf : CDPosType;
T : byte;
Begin
Writeln('Playing CD ...');
T:= 1;
B:= CDPlayAudio(T,$FFFFFFF);
cdshowinfo;
End;
i przy kompilowaniu jest : File not found <CDROM.TPU>
mam tez moduł do obslugi cd-romu ale on tez nie dziala
pozdrawiam