Autor Beitrag
Psyko²k
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Mo 31.10.05 22:24 
Hallo Leute,

Hab Folgendes Problem, hab eine Update Funktion in meinem Programm.
Es gibt max 3 Datein die Upzudaten sind und das prüft mein Programm indem es jeweils die txt im internet prüft.
Es sind also auch 3 TXT Dateien im Internet. Ich möchte aber alle Informationen in 1 Schreiben und dann richtig auslesen.

Also irgendwie:

[Update1]
1001
[Update2]
31102005
[Update3]
bla bla...

Wie kann ich jetzt nur das was nach Update3 kommt auslesen oder so ähnlich.
Hoffe habt mich verstanden.

Greets
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 31.10.05 22:25 
Moin!

Schau dich mal nach INI-Dateien und TIniFile um, das sollte das sein, was du suchst.

cu
Narses
Pierre
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 138

Win 98se und XP prof
D5Pers und D7Prof
BeitragVerfasst: Fr 11.11.05 19:22 
Hallo,
erst downloaden mit
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
uses
  URLMon  // u.U. auch ShellApi, mal kurz testen, habe ich jetzt nicht nachgeschaut


var
DestFile,version_1,version_2,version_3:string; 
const
  SourceFile = 'http://www.wo_auch_immer.de/vers/version.txt';
begin
  DestFile := extractFilePath(Application.Exename) + 'download\version.txt';
  if DownloadFile(SourceFile, DestFile) then
  begin   end else  ;


dann einlesen
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
  if fileexists (DestFile) then
  begin
  AssignFile(F, DestFile);
  Reset(F);
  readln(f); //Überschrift Prg.1
  readln(f,version_1);
  readln(f); //Überschrift Prg.2
  readln(f,version_2);
  readln(f); //Überschrift Prg.3
  readln(f,version_3);
  CloseFile(F);


Sinnvoll wäre sicherlich ein try-Block.

Ich hoffe, es hilft.
Gruß Pierre

Moderiert von user profile iconGausi: Quote- durch Delphi-Tags ersetzt