How to minimize IE?

D

DG

Hello and thanks for the help.

How do I minimize Internet Explorer?

Below is a snip of code with which I need help:
$BROWSER = Win32::OLE->new('InternetExplorer.Application'); #open the
browser
$BROWSER->{'Visible'}=1;
#make it visible
<Minimize the Browser>
#minimize the browser window
$BROWSER->Navigate("http://www.yahoo.com");
#go to yahoo.com

What code do I need to minimize the browser window?

Thanks,
DG
 
M

Matt Garrish

Purl Gurl said:
I would like you to try this version.

#!perl

use Win32::OLE;

$BROWSER = Win32::OLE->new('InternetExplorer.Application.1');
$BROWSER -> with (Visible => 1, Top => 1, Left => 1, Height => 50, Width => 500);
$BROWSER->Navigate("http://www.yahoo.com");


My hunch is that will be more to your liking. Decreasing height to 20
and increasing width to 1000, makes for nice mini-toolbar look. This
depends on your screen pixel setting and may need adjusting.

For multiple machine usage, you "might" encounter some variations,
again depending on pixel setttings.

Huh? The screen resolution would only affect how much of the browser window
might be showing.

You will definitely encounter variation depending on the OS and the settings
employed (classic vs. XP, for example). What gets displayed and how is based
on rendering algorithms, so assuming that because you see part of the
menubar at a certain size everyone else will is a bad idea.

But then again, you are answering some question that was never asked...

Matt
 
D

DG

Thanks for the idea. It's definately an improvement over what I was using.

But I was wondering, how do I minimize/iconify the window into the toolbar
at the bottom of the screen?

Again, thanks for the help (you've removed a big anoyance for me).
 
A

A. Sinan Unur

Thanks for the idea. It's definately an improvement over what I was
using.

But I was wondering, how do I minimize/iconify the window into the
toolbar at the bottom of the screen?

Again, thanks for the help (you've removed a big anoyance for me).

#! perl

use strict;
use warnings;

use Win32::CtrlGUI;

my $window = Win32::CtrlGUI::wait_for_window(qr/^Yahoo!/);
$window->send_keys("! n");

__END__

CPAN is your friend.
 
A

A. Sinan Unur

A. Sinan Unur wrote:

(Purl Gurl provided working code examples:)



Will your code automatically start MSIE, automatically load Yahoo
and automatically minimize his browser window as he asks?

#! perl

use strict;
use warnings;

use Win32::CtrlGUI;
use Win32::OLE;

my $ie = Win32::OLE->new('InternetExplorer.Application');
$ie->{'Visible'} = 1;
$ie->Navigate("http://www.yahoo.com");


my $handle = Win32::CtrlGUI::Window->_new($ie->{HWND});
$handle->send_keys('! n');

__END__

Whatever ...
 
M

Matt Garrish

Purl Gurl said:
That is correct. You are very observant.

Isn't it nice window size is adjustable so users can
create a personally visually appealing desktop?

A thousand wide pixel setting looks great on my monitor.
Might run far off the right edge of yours, or create
scroll bars after crunching down the window, yes?

Maybe you are only moderately observant.

So, in other words, you still don't understand difference between a pixel
and a rendering algorithm. I suppose it explains your inability to see the
trees from the forest, though.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top