?
Solved

IE's URL APP

Posted on 2004-10-16
3
Medium Priority
?
160 Views
Last Modified: 2010-04-05
I need one app that when the person views one site in IE, save the adress of the page in one .txt.
tnx
0
Comment
Question by:cels9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Expert Comment

by:Evarest
ID: 12331573
This will get the URL of the currently active IExplorer

 function Get_URL(Servicio: string): String;
                  var
                    Cliente_DDE: TDDEClientConv;
                  begin
                    Result := '';
                    Cliente_DDE:= TDDEClientConv.Create( nil );
                    with Cliente_DDE do
                      begin
                        SetLink( Servicio,'WWW_GetWindowInfo');
                        Result := StrPas(RequestData('0xFFFFFFFF'));
                        CloseLink;
                      end;
                    Cliente_DDE.Free;
                  end;

procedure TForm1.Button1Click(Sender);
begin
 Memo1.Lines.Add( Get_URL('IExplore') );
 // or for Netscape:
 Memo1.Lines.Add( Get_URL('Netscape') );
end;

You can of course set this function in a Timer and check every x msec whether the URL has changed (new window/new url)...

Good luck!
Evarest
0
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 1500 total points
ID: 12331583
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12358642
This will get the URL of EVERY currently open instance of IE, even the ones that are minimized or hidden (not shown):

procedure TForm1.Button1Click
  ( ASender:                   TObject
  );
var
  ShellWin : TShellWindows;
  i : integer;
  IE : IWebBrowser2;
begin
  ShellWin := TShellWindows.Create(nil);
  try
    for i := 0 to ShellWin.Count-1 do
      begin
        try
          ShellWin.Item(i).QueryInterface(IID_IWebBrowser2, IE);
          Memo1.Lines.Add( IE.LocationName + '->' + IE.LocationURL);
        except
        end;
      end;
  finally
    ShellWin.Free;
  end;
end;
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question