Hi,

Calling getWindowText() is only going to return the 'windows text' which is usaully just the title of the window. In a browsers case, this ussually include the title of the web page as well (Look in the upper left corner of your browser window).

If you want the text that is being displayed, you could always save the file and then read it from your perl script. You could do that by the SendKeys() method, passing in a string like SendKeys("%(fs)").

This would first send a Control-F, which would invoke the file menu, then a Control-S, which would invoke "Save-As". Then you would have to deal with the resulting dialog as a new window. Just send the keys of where you want to save the file, then open it from your perl script.

Now, it would be very apparent to the user what you are doing. If you are writing spyware though, I'll wished I had never helped you...

But I am sure that you are not practicing the dark arts...

"Never take yourself too seriously, because everyone knows that fat birds dont fly" -FLC

In reply to Re: Using Win32::GuiTest with Explorer_Server by scmason
in thread Using Win32::GuiTest with Explorer_Server 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.