Autor Beitrag
jesus2k
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Di 01.05.07 01:03 
also ich habe ein memo und in dem steht zum beispeil
de = hallo
af = 123
xd = bla bla bla
usw

jetzt möchte ich das ich z.B.nach "xd = " suche und "bla bla bla" in die zwischenablage kopiere

bzw das soll in einem 2ten memo "#xd" ersetzen.
Sauger Chris
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 228

Win XP, Linux SuSE 9.2
Delphi 4,Delphi 7 Ent.
BeitragVerfasst: Di 01.05.07 06:33 
so moin erst mal :)

bitte änder mal dein titel von deinem post weil erst heißt es du willst was markieren und dann
doch nur in die zwischenablage kopieren dann wiederum was erstezen also bitte was nu ^^ (bitte mach das)


also hier mal ne kleine erleuchtung wie du strings finden kannst
(ist jetzt für n memo komp.)

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
------------------------------------------------------------------------------
                       string suche
------------------------------------------------------------------------------
var
i: integer;
begin
for i:=0 to memo1.Lines.Count-1 do
 if pos('xd =', memo1.Lines[i])>0 then                  // das schlüßel word lautet pos()
  showmessage('xd = befindet sich in der Zeile '+inttostr(i+1));
end;

------------------------------------------------------------------------------
                      string in zwischenablage speichern
------------------------------------------------------------------------------
ClipBoard.AsText:='Text';
zongo-joe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 134

win xp prof
D3, D4, D7
BeitragVerfasst: Di 01.05.07 08:37 
... ausserdem sind noch die Befehle COPY und STRINGREPLACE zum ersetzen von #xd ganz hilfreich...
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: Di 01.05.07 10:39 
Hallo,

oder eventuell auch so:
ausblenden Delphi-Quelltext
1:
ClipBoard.AsText := Memo1.Lines.Values['xd '];					

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )