Autor Beitrag
kulka1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mi 03.06.09 11:04 
:roll: danke... das läuft jetzt soweit...

ich möchte das jetzt noch gerne mit einer progressbar in verbindung setzn, wie wenn man beim richtigen explorer was läd das auch angezeigt wird ;), weil es mir vorkommt als ob nichts passiert wenn man einfach nur auf den button klickt^^

wie krieg ich die mit in das projekt? also die progressbar?
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mi 03.06.09 11:09 
Was war es?

Zu der neuen Frage: Mach nen neuen Thread auf.
Könntest aber vorher auch suchen, da es hierzu bestimmt schon ein Thema gibt.

_________________
PROGRAMMER: A device for converting coffee into software.
kulka1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mi 03.06.09 13:14 
hab den falschen pfad angegeben ;)... läuft aber... zu meiner neuen frage mach ich dann n neuen thread auf...^^, ist ja nur ne kleine frage
kulka1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mi 03.06.09 16:17 
hey, hab noch einmal eine frage und zwar:

möchte ich das wenn ich die datei runterlade, dass er sie in den ordner von fifa09 (Fifa 09\data\cmn\) packt und die bestehende .db (fifa.db) ersetzt, EGAL wo sich das verzeichnis befindet, egal ob in C:\\ oder in D:\\

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.Button5Click(Sender: TObject);
begin
   regist := Tregistry.create;
   regist.rootkey := hKey_Local_machine;
   if regist.openkey('Software\EA Sports\FIFA 09', false) and regist.ValueExists('Install Dir'then
   DownloadFile('http://foliga.de/fifa.db''Software\EA Sports\Fifa 09\data\cmn\fifa.db')
   else
      ShowMessage('Hat nicht geklappt');
   regist.closekey;
   regist.Free
end;


er gibt mir aber die meldung
Rewrite(localFile,1); sei falsch, also das das verzeichnis nicht besteht...

wie muss ich das anwenden?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 03.06.09 16:33 
Du verwendest in dem angegebenen Quelltext ja auch nicht mehr den Eintag aus der Registry, sondern speicherst in den Ordner 'Software\EA Sports\Fifa 09\data\cmn' unterhalb deines Arbeitsverzeichnisses... :roll:
Kann es sein, dass du da grad keine Ahnung hast was du da machst? Du mischst anscheinend Registrypfade und Dateipfade auf der Festplatte... :shock:
kulka1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mi 03.06.09 16:47 
ups... was muss ich denn hinschreiben das er das automatisch in den ordner kopieren soll wo fifa installiert ist?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 03.06.09 16:59 
Du musst eben mit ReadString (wie du es auch schon kopiert hattest), den Wert aus der Registry auslesen.

Verstehe erst einmal was da überhaupt passiert, dann wird das auch klappen...
kulka1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mi 03.06.09 18:02 
welcher Wert ist das denn aus der Registry?
anscheind ist es ja nicht schon wieder INSTALL DIR oder?

hab ma die registry angehängt
Einloggen, um Attachments anzusehen!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 03.06.09 18:09 
Was sonst? Das Unterverzeichnis data\cmn musst du halt anhängen...
kulka1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mi 03.06.09 18:17 
und was war dann genau an meinem code vorhin falsch?
könntest du den evtl verbessern?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 03.06.09 18:24 
ausblenden Delphi-Quelltext
1:
2:
if regist.OpenKey('Software\EA Sports\FIFA 09', false) and regist.ValueExists('Install Dir'then
  DownloadFile('http://foliga.de/fifa.db', regist.ValueExists('Install Dir') + 'data\cmn\fifa.db');
Du weist doch, dass der ausgelesene String mit ReadString der Pfad bis zu dem Verzeichnis ist, und dann fehlt eben noch der Rest...
kulka1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mi 03.06.09 18:39 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.Button2Click(Sender: TObject);
begin
   regist := Tregistry.create;
   regist.rootkey := hKey_Local_machine;
  if regist.OpenKey('Software\EA Sports\FIFA 09', false) and regist.ValueExists('Install Dir'then
  DownloadFile('http://foliga.de/fifa.db', regist.ValueExists('Install Dir') + 'data\cmn\fifa.db')
  else
      ShowMessage('Fehlgeschlagen');
  regist.CloseKey;
  regist.free
  end;


so schaut das jetzt aus... aber jetzt sagt er in zeile 6:

Inkompatible Typen. 'string' und 'boolean'

immer diese blöden meldungen -.-, in der hilfe steht auch nichts brauchbares -.-
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 03.06.09 18:41 
Jetzt hab ich mich schon selbst verschrieben, ich hatte ja vorher auch von ReadString geredet, aber da dann das ValueExists hinkopiert. Da gehört ReadString hin, dass der Wert existiert, war ja vorher schon abgefragt.