Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi IeHttp Problem mit txt file vergleichen (https://www.delphipraxis.net/66013-iehttp-problem-mit-txt-file-vergleichen.html)

mOzZzI 23. Mär 2006 14:43

Re: IeHttp Problem mit txt file vergleichen
 
Zitat:

Zitat von Klaus01
Delphi-Quellcode:

if
iehttp1.ExecuteURL('http://www.luphisoft.de/toolbar/version.txt').sl.text <> version then


oder
Delphi-Quellcode:
iehttp1.ExecuteURL('http://www.luphisoft.de/toolbar/version.txt');
if iehttp1.sl.text <> version then
Grüße
Klaus

Haab ein Problem er gibt immer "ok" zurück egal was in der version.txt steht... :gruebel:

Delphi-Quellcode:
const version = '1.5.0'
...
procedure TForm1.Button1Click(Sender: TObject);
begin
iehttp1.ExecuteURL('http://www.luphisoft.de/toolbar/version.txt');
if iehttp1.sl.Text <> version then
 Edit1.Text:='ok'
else Edit1.Text:='no';
end;
Zitat:

Zitat von version.txt
1.5.1

Aber er gibt immer ok zurück

Klaus01 23. Mär 2006 14:51

Re: IeHttp Problem mit txt file vergleichen
 
Hast Du schon mal geschaut was Dir

Delphi-Quellcode:
iehttp1.sl.Text
zurückliefert, kannst Du dir ja ctrl-f5 anschauen
oder mal in einem TMemo ausgeben?
Vielleicht fällt es ja auf warum immer ein o.k kommt.

Ausserdem prüfst du auf Ungleichheit. d.h wenn iehttp1.sl.Text <> version ist
kommt o.k. zurück.

Delphi-Quellcode:
if iehttp1.sl.Text <> version then
  Edit1.Text:='ok'
else
  Edit1.Text:='no';

mOzZzI 23. Mär 2006 14:57

Re: IeHttp Problem mit txt file vergleichen
 
Zitat:

Zitat von Klaus01
Hast Du schon mal geschaut was Dir

Delphi-Quellcode:
iehttp1.sl.Text
zurückliefert, kannst Du dir ja ctrl-f5 anschauen
oder mal in einem TMemo ausgeben?
Vielleicht fällt es ja auf warum immer ein o.k kommt.

Ausserdem prüfst du auf Ungleichheit. d.h wenn iehttp1.sl.Text <> version ist
kommt o.k. zurück.

Delphi-Quellcode:
if iehttp1.sl.Text <> version then
  Edit1.Text:='ok'
else
  Edit1.Text:='no';

ich bin doof, hab den fehler gefunden :wall:


Alle Zeitangaben in WEZ +1. Es ist jetzt 06:09 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz