Re: Reading content of widget
You'll most likely want to use WMGetText() on the widget that
contains the digits.
--- In email@example.com, Gabor Szabo <gabor@p...> wrote:
> I am new here and the question obviously shows my lack of RTFM and
> understanding of the Windowing world, please bear with me.
> I am trying to test calc.exe (OK, I am trying to learn
> and this is the example I use).
> It works nicely so far I can push the buttons but how
> can I check the results of the calculation ?
> I have an untested work around:
> - Copy/Paste the results to notebook
> - save it and
> - open the file by Perl
> but somehow it does not feel right to use such a work around in
> the general case :-)
> Probably I could do something with OLE automation too but that
> does not make sense (to me) in the general case.
> Can someone please point me to the right RTFM about reading
> Here is the script so far:
> use Win32::GuiTest qw(
> $Win32::GuiTest::debug = 0;
> system "start calc.exe";
> my @windows = FindWindowLike(undef, "Calculator");
> PushButton '3';
> PushButton '\*';
> PushButton '7';
> PushButton '=';
> # how can I check the results ?
> # and then close the window...