Hi,
ich hab mal ein komisches Problem:
Ich habe diesen code. S soll die suchmaske sein und zwar ('String',htmlcode) (htmlcode is das file, daran liegts nich)
normal sieht der code so aus:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8:
| var s: integer; begin Quellcodepfad:=ExtractFilePath(ParamStr(0))+'temp3.html';
LoadStringfromFile(quellcodepfad,htmlcode);
s:=pos('http://rs31.rapidshare.com/access,htmlcode); |
damit geht es auch. Aber leider is dieses rs31 dynamisch und das muss ich angleichen.
also hab ich das mal so gemacht:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
| var s: integer; surlmake: string; begin Quellcodepfad:=ExtractFilePath(ParamStr(0))+'temp3.html';
LoadStringfromFile(quellcodepfad,htmlcode); surlmake:=form2.label11.caption+'access'; label10.caption:=surlmake; s:=pos(surlmake,htmlcode); label12.caption:=inttostr(s); |
damit gehts wiederum nicht. In label12 hab ich mir den wert ja anzeigen lassen. bei der 1. methode, die funktioniert, ist er 6124 oder so. Bei der 2., die nicht funktioniert - 0. Warum is das so?