Assuming that you are on a Win32 platform (does IE still run on Macs?), this could be done from perl.

It would not be easy, and it would require either a pretty goood understanding of the Win32 APIs or a lot of research and perseverance.

The best starting point would be to look at Win32::GuiTest. Look into the source as the POD as displayed on cpan does not mention most of the functionality available within this module. The particular part of the source that is interesting is the @EXPORT_OK section that lists all the APIs that can be exported by the module. It begins.

@EXPORT_OK = qw( $debug ClientToScreen FindWindowLike GetChildDepth GetChildWindows GetClassName GetCursorPos GetDesktopWindow GetComboText GetComboContents GetListText GetListContents GetParent GetScreenRes GetWindow GetWindowID GetWindowLong GetWindowRect GetWindowText

Most of these function are undocumented in the pod from what I can see, but if you use an interactive debugger session you can explore the apis listed in the source and get a (brief) usage for them as shown here.

perl -de1 C:\test>perl -de1 Default die handler restored. Loading DB routines from perl5db.pl version 1.07 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(-e:1): 1 DB<1> use Win32::GuiTest qw[:ALL :SW] DB<5> print GetForegroundWindow( 'A totally meaningless parameter' ) Usage: Win32::GuiTest::GetForegroundWindow() at (eval 8)[E:/Perl/lib/p +erl5db.pl:1521] line 2. DB<7> $f = GetForegroundWindow() DB<8> print $f 346162044 DB<10> GetWindowText() Usage: Win32::GuiTest::GetWindowText(hwnd) at (eval 13)[E:/Perl/lib/pe +rl5db.pl:1521] line 2. DB<12> print GetWindowText( $f ) Command Prompt - perl5.6.1 -de1

If any of this makes sense to you and you wish to pursue this course, get that far and come back with any specific qustions you have and I'll try to help further.

Good luck.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


In reply to Re: Perl application to read the current browser page by BrowserUk
in thread Perl application to read the current browser page by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.