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: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86:
| procedure TForm1.Update; var Buff: PChar; sourcecode: string; Player, Gesamt, PoC, PoCK: Integer; begin sourcecode:= Wb1.OleObject.Document.documentElement.innerHTML; Buff:= PChar(sourcecode); mmo2.Clear; mmo2.Lines.Add(sourcecode); if SearchBuf(Buff, length(Buff), 0, 0, '>' + cbbServername.Text + '<') <> nil then begin lblServername.Font.Color:= clBlack; lblServername.Caption:= 'Servername: ' + cbbServername.Text; if SearchBuf(Buff, length(Buff), 0, 0, '>' + cbbServername.Text + '</A></TD>'+#13+'<TD class=svClosed>') <> nil then begin lblStatus.Font.Color:= clRed; lblStatus.Caption:= 'Status: Closed'; For Player:= 0 to 4000 do begin if SearchBuf(Buff, length(Buff), 0, 0, '<TD class=svClosed>' + IntToStr(Player) + '/') <> nil then begin Application.ProcessMessages; For Gesamt:= 2000 to 4000 do begin if SearchBuf(Buff, length(Buff), 0, 0, '<td class=svClosed>' + IntToStr(Player) + '/' + IntToStr(Gesamt) + '</td') <> nil then begin Application.ProcessMessages; lblPlayer.Caption:= 'Player: ' + IntToStr(Player) + '/' + IntToStr(Gesamt); For PoC:= 0 to 100 do begin if SearchBuf(Buff, length(Buff), 0, 0, '<div align=right>'+ IntToStr(PoC)) <> nil then begin Application.ProcessMessages; For PoCK:= 0 to 9 do begin if SearchBuf(Buff, length(Buff), 0, 0, '<div align=right>'+ IntToStr(PoC) + '.' + IntToStr(PoCK) + '</DIV>') <> nil then begin Application.ProcessMessages; If (PoC > 80) Then begin lblPoc.Font.Color:= clGreen; end; If (PoC < 80) and (PoC > 20) Then begin lblPoc.Font.Color:= clYellow; end; If (PoC < 20) Then begin lblPoc.Font.Color:= clRed; end; lblPoc.Caption:= 'PoC: ' + IntToStr(PoC) + '.' + IntToStr(PoCK) + ' %'; end; end; end; end; end; end; end; end; end; end else begin if not (SearchBuf(Buff, length(Buff), 0, 0, '>Server Inspection</td') <> nil) then begin lblServername.Font.Color:= clRed; lblServername.Caption:= 'Servername: Nicht Gefunden'; end; end; if (SearchBuf(Buff, length(Buff), 0, 0, '>Server Inspection</td') <> nil) then begin lblServername.Font.Color:= clRed; lblServername.Caption:= 'Server Inspection'; lblPlayer.Visible:= False; lblPoc.Visible:= False; lblStatus.Visible:= False; cbbServername.Enabled:= False; end else begin lblPlayer.Visible:= True; lblPoc.Visible:= True; lblStatus.Visible:= True; cbbServername.Enabled:= True; end; end; |