como dar comandos d console no kylix??
20/04/2004
0
to querendo fazer um programinha pra fazer rencode d mp3, soh q precisa estar estar dentro do diretorio do lame e dar os comandos dentro desse dir e eu preciso pegar os parametros q usuario deseja como por exemplo o birtrate... como eu faço pra dar comando d console no kylix pra fazer oq eu to querendo????
ex em console:
#cd /usr/local/bin
lame -b 56 entrada.mp3 saida .mp3
ex em console:
#cd /usr/local/bin
lame -b 56 entrada.mp3 saida .mp3
Mestre5
Curtir tópico
+ 0
Responder
Posts
26/04/2004
Dopi
Achei esse codigo no newsgroup.borland.com. Roda comandos externos em Linux e Windows
Na clausula uses:
{$ifdef LINUX} Libc, {$endif}
{$ifdef MSWINDOWS} Windows, {$endif}
procedure RunCommand(Command: String);
var
{$ifdef MSWINDOWS} Show : Integer;{$endif}
{$ifdef LINUX} {$endif}
ConnectCommand : PChar;
begin
{$ifdef LINUX}
ConnectCommand := PChar(Command + ´&´);
Libc.system(ConnectCommand);
{$endif}
{$ifdef MSWINDOWS}
ConnectCommand := PChar(Command);
Show := sw_ShowNormal;
winexec(ConnectCommand, Show);
{$endif}
end;
Na clausula uses:
{$ifdef LINUX} Libc, {$endif}
{$ifdef MSWINDOWS} Windows, {$endif}
procedure RunCommand(Command: String);
var
{$ifdef MSWINDOWS} Show : Integer;{$endif}
{$ifdef LINUX} {$endif}
ConnectCommand : PChar;
begin
{$ifdef LINUX}
ConnectCommand := PChar(Command + ´&´);
Libc.system(ConnectCommand);
{$endif}
{$ifdef MSWINDOWS}
ConnectCommand := PChar(Command);
Show := sw_ShowNormal;
winexec(ConnectCommand, Show);
{$endif}
end;
Responder
Clique aqui para fazer login e interagir na Comunidade :)