Brett Wraight has asked for the wisdom of the Perl Monks concerning the following question:

I was wondering if the monks know how to solve this one :)

I am trying to find out what is the currrent url in internet explorer

I have been able to get information from index.dat and work backwards and do a little bit of matching to get the most recent url.

however if a person uses the back or forward buttons on the browser I only get the last url visited not not the one displayed.

Is there some magic dll I can access or some other way of getting current url diplayed in internet explorer.

I have seen a compilied application that does this most likely developed in c++, as perl is my only language of choice I need to figure this out.......

hmmmmmmmm..........

******help me monks********

thanks

Brett Wraight

Replies are listed 'Best First'.
Re: IE URL source win32
by gellyfish (Monsignor) on Jul 08, 2003 at 09:47 UTC

    You could use Win32::OLE to automatate the current instance of IE to get the current page - I would suggest that you start with the OLE Browser that comes with ActivePerl and take it from there.

    /J\
    
Re: IE URL source win32
by Albannach (Monsignor) on Jul 08, 2003 at 14:03 UTC
    Perhaps something like:
    use strict; use warnings; use Win32::GuiTest; my @explorers = Win32::GuiTest::FindWindowLike(0, 'Microsoft Internet +Explorer$'); print "Found ",scalar @explorers, " open IE windows\n"; for my $instance (@explorers) { my @edits = Win32::GuiTest::FindWindowLike($instance, "", "Edit"); print Win32::GuiTest::WMGetText($edits[0]); }

    --
    I'd like to be able to assign to an luser