Posted on 2009-10-16 19:00:31-07 by dnaisgoodforyou
MaximizeIE not working - a solution
I've never been able to maximize IE, either upon creating a new Win32::IEAutomation object with:

my $ie = Win32::IEAutomation->new(visible => 1, maximize => 1);

or by creating a WinClicker object and (trying to) maximizing it with:

my $clicker = Win32::IEAutomation::WinClicker->new(); $clicker->maximize_ie();

The only solution I found is to change the Perl code of WinClicker.pm which handles this job. The problem seems to be that the IE window is not "found" so the instruction to maximize is sent into oblivion and has no effect. If you want to do this, find WinClicker.pm in your Perl directory and change one line in the maximize_ie subroutine from:

$self->{autoit}->WinSetState("Microsoft Internet Explorer", "", $self->{autoit}->SW_MAXIMIZE);

to:

$self->{autoit}->WinSetState("Internet", "", $self->{autoit}->SW_MAXIMIZE);
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.