Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Internet (https://www.clubdelphi.com/foros/forumdisplay.php?f=3)
-   -   Obtener Historial de Navegacion (https://www.clubdelphi.com/foros/showthread.php?t=78206)

RolyH7 29-03-2012 05:59:37

Obtener Historial de Navegacion
 
Hola a todos, quisiera saber si alguien sabe como obtener el historial de navegacion en una aplicacion hecha en delphi porsupuesto, soy nuevo en esto y espero qe me ayuden, les agradezco de antemano :D

ecfisa 29-03-2012 22:09:46

Hola RolyH7 y bienvenido a Club Delphi :)

Para Internet Explorer:
Código Delphi [-]
uses
  ComObj;

procedure GetIEHistoryList(TS: TStrings);
const
  ITEM_NAME = 0;
  ITEM_DATE = 2;
  HISTORY_LIST = 34;
var
  URL: string;
  Visitada: string;
  i,j,k: Integer;
  Shell, Item, ItFolder, ItSite,
  PgFolder, PgItem, Folder: OleVariant;
begin
  Shell:= CreateOleObject('Shell.Application');
  Folder:= Shell.NameSpace(HISTORY_LIST);
  TS.Clear;
  TS.Add('Ubicación: ' + Folder.Self.Path);
  for i:= 0 to Folder.Items.Count - 1 do
  begin
    Item:= Folder.Items.Item(i);
    TS.Add('Período: ' + Item.Name);
    if Item.IsFolder then
    begin
      ItFolder:= Item.GetFolder;
      for j:= 0 to ItFolder.Items.Count - 1 do
      begin
        ItSite:= ItFolder.Items.Item(J);
        TS.Add('Sitio: ' + ItSite.Name);
        if ItSite.IsFolder then
        begin
          PgFolder:= ItSite.GetFolder;
          for k:= 0 to PgFolder.Items.Count - 1 do
          begin
            PgItem:= PgFolder.Items.Item(k);
            URL:= PgFolder.GetDetailsOf(PgItem, ITEM_NAME);
            Visitada:= PgFolder.GetDetailsOf(PgItem, ITEM_DATE);
            TS.Add('URL: ' + URL );
            TS.Add('Visitada: ' + Visitada);
          end
        end;
        TS.Add('----------------------------------------------------')
      end
    end
  end
end;

Llamada ejemplo:
Código Delphi [-]
    GetIEHistoryList(Memo1.Lines)


Saludos.

RolyH7 31-03-2012 04:24:57

Muchísimas gracias ecfisa!! he probado el código y me corre de maravilla, es exactamente lo qe qeria, estoy muy agradecido, muchísimas gracias de verdad:D

rretamar 31-03-2012 19:06:49

En Firefox acceder a sus tablas es muy simple, porque utiliza el formato SQLite.

RolyH7 01-04-2012 20:44:25

Muchas Gracias rretamar por tu aporte,lo tendrè en cuenta :)


La franja horaria es GMT +2. Ahora son las 02:03:21.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi