executar arquivo .html no kylix

Delphi

14/09/2004

Pessoal,

estou fazendo um aplicativo que ira rodar tanto no linux quanto no windows.

quero executar um arquivo no kylix html pois no delphi ja consegui com o shellexecute.

se alguem puder me ajudar....

valeu


Diogodumas

Diogodumas

Curtidas 0

Respostas

Dopi

Dopi

14/09/2004

Achei esse codigo no newsgroup.borland.com. Roda comandos externos em Linux e Windows Não sei se funciona para arquivos NAO Executáveis. com executáveis já testei e funcionou


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



GOSTEI 0
Diogodumas

Diogodumas

14/09/2004

valeu daniel,

funcionou. obrigado pela dica.


GOSTEI 0
POSTAR