Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

Detect browser Urls and close them if appropriate

Hi,

This is probably a tough one, that's why I'm offering 300 points for it.

Here's the deal.  I have a list of urls which may not be opened.  I have to check if a browser with any of the urls on the list is running, if it is, then shut it down.

This has to work with IE, Netscape and preferably Opera.

I know this is possible somehow, I've seen components that can retrieve the URLs of all open browsers, but they are never for free.

Regards,
Hagur
0
hagur
Asked:
hagur
1 Solution
 
ginsonicCommented:
uses DDEMan;

procedure TForm1.Button1Click(Sender: TObject);
var
  DDE:TDDEClientConv;
begin
  DDE:=TDDEClientConv.Create(self);
  if DDE.SetLink('IExplore','WWW_GetWindowInfo') then
  Memo1.Lines.Add(DDE.RequestData('0xFFFFFFFF,sURL,sTitle'));
  DDE.Free;
end;
0
 
intheCommented:
nick,
nice idea but netscape doent support dde anymore.(netscape 6 i mean)

may have to use findwindow()to get to the text edit.
0
 
hagurAuthor Commented:
Thanks for your comments guys,  I knew about the DDE method to retrieve the url from IE.  But what about
Netscape or Opera?

Can anyone please show me how I could do this?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
GwenaCommented:
listening :-)
0
 
hagurAuthor Commented:
Anyone?
0
 
quantum2Commented:
Yeah...
http://www.atarimax.com/delphi/tgraburl/

Works like a charm !

Q2
0
 
pnh73Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer from quantum2

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now