|
unit global;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, SysUtils,process;
|
|
var
|
|
g_fichero_conf:string='/etc/aulalinex-red.conf';
|
|
g_ExploradorArchivos:string='nautilus';
|
|
g_dirmensaje:string;
|
|
g_carpeta:string;
|
|
g_tipo:integer;
|
|
g_mensaje,g_titulo,g_usuario:string;
|
|
g_tiempo:integer;
|
|
g_archivo:integer;
|
|
g_parcorrecto:boolean=false;
|
|
Function CambiaCaracteres(frase:string):string;
|
|
procedure Ejecutar (comando:string);
|
|
implementation
|
|
procedure Ejecutar (comando:string);
|
|
var
|
|
P: TProcess;
|
|
mproceso:string;
|
|
begin
|
|
P := TProcess.Create(nil);
|
|
try
|
|
mproceso:='sh -c '+QuotedStr(comando + ' 2>&1');
|
|
P.CommandLine := mproceso;
|
|
P.Execute;
|
|
finally
|
|
P.Free;
|
|
end;
|
|
end;
|
|
Function CambiaCaracteres(frase:string):string;
|
|
var
|
|
comando:string;
|
|
begin
|
|
comando:=frase;
|
|
writeln(comando);
|
|
comando:=StringReplace(comando,'ñ','ñ',[rfReplaceAll]);
|
|
//writeln(comando);
|
|
result:=comando;
|
|
end;
|
|
end.
|
|
|