He probado a quitar los memos y poner 2 tstringlist pero no me funciona, no hace nada, tambien he probado con Tstrings pero me da "error abtracto" o algo asi.
Que puede fallar? el mismo código con memos funciona.
Código PHP:
procedure TForm1.FormActivate(Sender: TObject);
var ind,tt:integer;
file1,file2:TStringlist;
begin
file1:= TStringlist.create;
file2:= TStringlist.create;
file1.text:=idHttp1.Get('http://www.aemet.es/es/eltiempo/prediccion/localidades?l=22001');
for ind := 0 to file1.Count-1 do
begin
if file1.ValueFromIndex[ind]='<h2 class="titulo">' then
begin
for tt := ind to file1.Count-1 do
begin
file2.Add(file1.ValueFromIndex[tt]);
if file1.ValueFromIndex[tt]=' <form name="frmMunicipio" method="get" action="/es/eltiempo/prediccion/localidades">' then
begin
file2.ValueFromIndex[0]:= '<link rel="stylesheet" type="text/css" media="screen" href="http://www.aemet.es/css/estilos.css" /><h2 class="titulo">';
file2.text:= StringReplace( file2.text,'/imagenes/','http://www.aemet.es/imagenes/',[rfReplaceAll]);
wb1.LoadFromStrings(file2);
file1.Free;
file2.Free;
exit
end;
end;
end;
end;
end;