procedure TfrmPrincipal.BtnConsProc(Sender: TObject);
var
pathRet : shortstring;
registro : TRegistry;
begin
Button8.enabled:=false;
Screen.Cursor:=crAppStart;
EditStatus.Text:='Aguarde...';
panel2.Refresh;
if (NfeRetRecepcao(EditConsultaProc.text)) then
begin
try
Registro:=TRegistry.Create;
if Registro.OpenKey('nfe',false) then
pathRet:= registro.ReadString('PathPrincipal')+'\nfe\retornos\temp.txt'
else
pathRet:= ExtractFilePath(ParamStr(0))+'nfe\retornos\temp.txt'; //arquivo fixo para retorno de mensagem de consulta de processamento
if not (FileExists(pathRet)) then
mmoConsultaProcessamento.Text:='Arquivo de retorno não localizado.'+#13+
pathRet
else
mmoConsultaProcessamento.Lines:=RetornaString(pathRet);
finally
registro.CloseKey;
Registro.Free;
end;
end else
mmoConsultaProcessamento.Text:='Falha.';
Button8.Enabled:=true;
EditStatus.Text:='Concluído.';
Screen.Cursor:=crDefault;
end;