Autor Beitrag
Sithlord
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 172



BeitragVerfasst: So 27.07.08 20:24 
Hallo !

Möchte von einer Homepage alle Moderatoren auflisten, welche Online sind - das klappt auch, aber sie stehen mehrmals da ... Der Code wird aber nicht wiederholt - wie ist das zu erklären ?

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
procedure TForm1.Button6Click(Sender: TObject);
var
s:string;
Position:integer;
begin
webbrowser2.Navigate('http://www.pcfreunde.de/forum/mitglieder-nowonline-3-2-1/');
while (WebBrowser2.ReadyState < READYSTATE_COMPLETE) do
  Application.ProcessMessages;
  listbox1.Items.Delete(-1);
memo2.Lines.Add(webbrowser2.OleObject.Document.documentElement.innerHTML);
s:=memo2.text;
listbox1.Items.Delete(-1);

Position := Pos('DERamateur', s);
  if Position <> 0 then
listbox1.Items.Add('DERamateur ist online!');
Position := Pos('JustMe', s);
  if Position <> 0 then
listbox1.Items.Add('JustMe ist online!');
Position := Pos('lichtbogenbändiger', s);
  if Position <> 0 then
listbox1.Items.Add('Der lichtbogenbändiger ist online!');
Position := Pos('madschuli', s);
  if Position <> 0 then
listbox1.Items.Add('madschuli ist online!');
Position := Pos('nobody4ever', s);
  if Position <> 0 then
listbox1.Items.Add('nobody4ever ist online!');
Position := Pos('norbär', s);
  if Position <> 0 then
listbox1.Items.Add('Norbär ist online!');
Position := Pos('PC Kraus', s);
  if Position <> 0 then
listbox1.Items.Add('PC Kraus ist online!');
Position := Pos('Pe-1981', s);
  if Position <> 0 then
listbox1.Items.Add('Pe-1981 ist online!');
end;

Die Seite der aktiven Benutzer ist hier :
www.pcfreunde.de/for...der-nowonline-3-2-1/

Weiß jemand warum das so ist ?
Kann mir sonst jemand den Code verbessern, sodass er läuft und sagen, was ich falsch gemacht habe ?

_________________
Heut ist nicht alle Tage, ich hab wieder ein Problem, keine Frage...