Autor Beitrag
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: So 19.02.06 14:23 
Hallo,

angenommen der String ist '13#dateipfad'.
Möchtest Du als Ergebnisse das Folgende haben?
Kommando = '13'
Argument = 'dateipfad'

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
Amateur
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 777

(Win98, WinMe) WinXP Prof
D3 Prof, D6 Pers, D2k5 Pers., Turbo C++ Explorer
BeitragVerfasst: So 19.02.06 15:00 
nur mal wegen dem der code klappt nicht wenn das kommando einstellig ist. da würde ich einfach ne 0 vorschreiben und dann den code mit dem copy(text,p-2-2) nehmen

_________________
"Kein dummes Gerede. Kein Rumrätseln. Denkt an nichts anderes mehr, nur noch an das, was vor euch liegt. Das ist die wahre Herausforderung. Ihr müßt euch vor euch selbst schützen, Leute." (Rennes in "Cube")
Beiträge: >700
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 19.02.06 15:06 
user profile iconLannes hat folgendes geschrieben:
Hallo,

angenommen der String ist '13#dateipfad'.
Möchtest Du als Ergebnisse das Folgende haben?
Kommando = '13'
Argument = 'dateipfad'

:D Genau richtig :party:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 20.02.06 00:27 
Hallo,

1. mit Pos kannst Du feststellen wo das Zeichen '#' im String auftritt
2. mit Copy kannst Du die Zeichen bis zum '#' auslesen
3. mit Copy kannst Du die Zeichen hinter dem '#' auslesen

Punkt 1. u. 2. findest Du an dieser Stelle in diesem Thread.
Punkt 3. müsste dann eigentlich von Dir mit einer Befragung der Delphi-Hilfe und einer Suche hier im Forum lösbar sein, oder :?

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
Horst_H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1654
Erhaltene Danke: 244

WIN10,PuppyLinux
FreePascal,Lazarus
BeitragVerfasst: Mo 20.02.06 09:59 
Hallo,

@Koller:
Warum schickst Du nicht einfach eine Stringliste als Commatext.
Der erste String ist immer der Befehl und die folgenden(fast beliebgig viele), eben die Parameter dazu.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
BefehlsStrListe.clear;
BefehlsStrListe.Lines.Add(BefehlsString);//z.B.'01' oder 'ShutDown'
n := BestimmeParameterZahl;
For i := 1 to n do
  BefehlsStrListe.Lines.Add(Parameter[n]);
Send(BefehlsStrListe.Commatext);

Den BefehlsString kannst Du bei Empfang in einer BefehlsListe finden(auch per Hash, wenn Du lesbare Befehle wie 'ShutDown' nutzt )und mit einer Funktion verknuepfen.

Gruss Horst