Thema: Delphi ScriptingEngine?

Einzelnen Beitrag anzeigen

CalganX

Registriert seit: 21. Jul 2002
Ort: Bonn
5.403 Beiträge
 
Turbo Delphi für Win32
 
#14
  Alt 27. Mai 2003, 17:57
Habe gerade noch mal drüber geschaut. Jetzt sieht das ganze so aus:
Delphi-Quellcode:
  counter := 0;
  paramCounter := -1;
  oldEnd := 1;
  repeat
    inc(counter);
    if lineStr[counter] = '"then begin
      openString := true;
      i := counter;
      while openString do begin
        inc(i);
        if lineStr[i] = '"then
          openString := false;
      end;
      temp := copy(lineStr, counter, i - counter + 1);
      inc(paramCounter);
      Params[paramCounter] := temp;
      oldEnd := i;
      inc(counter);
    end;
    if (lineStr[counter] = ' ') or (length(lineStr) = counter) then begin
      temp := copy(lineStr, oldEnd, counter - oldEnd);
      inc(paramCounter);
      Params[paramCounter] := temp;
      oldEnd := counter - 1;
    end;
  until counter = length(lineStr);
Das Array geht von 0 bis 10 und die Ausgabe ist:
Code:
0: findwindow
1: "test"
2: " "
3:
4: "test test"
5:
6: " $1
7:
8: " $
9:
10:
Habt ihr eine Idee, wie man das ganze noch verbessern (lauffähig bekommen) könnte?

Chris
  Mit Zitat antworten Zitat