How to minimize IE?

Discussion in 'Perl Misc' started by DG, Jul 12, 2004.

  1. DG

    DG Guest

    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
    DG, Jul 12, 2004
    #1
    1. Advertising

  2. DG

    Matt Garrish Guest

    "Purl Gurl" <> wrote in message
    news:...
    > Purl Gurl wrote:
    >
    > > DG wrote:

    >
    > > > How do I minimize Internet Explorer?

    >
    > > use Win32::OLE;

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

    >
    > > sleep (5);

    >
    > > $BROWSER->with(Height => 1);

    >
    >
    > 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
    Matt Garrish, Jul 13, 2004
    #2
    1. Advertising

  3. DG

    DG Guest

    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).
    DG, Jul 13, 2004
    #3
  4. "DG" <> wrote in
    news:w1GIc.63516$MB3.24931@attbi_s04:

    > 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. Sinan Unur
    d
    (remove '.invalid' and reverse each component for email address)
    A. Sinan Unur, Jul 13, 2004
    #4
  5. Matt Garrish <> wrote:
    > "Purl Gurl" <> wrote in message



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



    Because it knows the answer to that one!


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Jul 13, 2004
    #5
  6. Purl Gurl <> wrote in
    news::

    > A. Sinan Unur wrote:
    >
    > (Purl Gurl provided working code examples:)
    >
    >> DG wrote:

    >
    >> > 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?

    >
    >> use Win32::CtrlGUI;

    >
    > 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 ...

    --
    A. Sinan Unur
    d
    (remove '.invalid' and reverse each component for email address)
    A. Sinan Unur, Jul 13, 2004
    #6
  7. Purl Gurl <> wrote in news:40F352A9.EA8A3
    @purlgurl.net:

    > You are suggesting loading four modules to accomplish
    > what one module can accomplish, correct?
    >
    > Actually five modules but one is a require "lite" adjunct
    > of no significance. Maybe call it a half module?
    >
    > Why four modules instead of one?


    http://www.apa.org/journals/psp/psp7761121.html

    --
    A. Sinan Unur
    d
    (remove '.invalid' and reverse each component for email address)
    A. Sinan Unur, Jul 13, 2004
    #7
  8. DG

    Matt Garrish Guest

    "Purl Gurl" <> wrote in message
    news:...
    > Matt Garrish wrote:
    >
    > > Purl Gurl wrote:
    > > > Purl Gurl wrote:
    > > > > DG wrote:

    >
    >
    > > > 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.

    >
    > > Huh? The screen resolution would only affect how much of the browser

    window
    > > might be showing.

    >
    >
    > 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
    Matt Garrish, Jul 13, 2004
    #8
  9. Re: OFF TOPIC Re: How to minimize IE? OFF TOPIC

    Purl Gurl <> wrote in news:40F36124.B97756D7
    @purlgurl.net:

    > A. Sinan Unur wrote:
    >>
    >> http://www.apa.org/journals/psp/psp7761121.html

    >
    > A somewhat entertaining research article. Moderately
    > well written but clearly not written by English majors
    > nor talented writers.


    Into this Universe, and Why not knowing
    Nor Whence, like Water willy-nilly flowing;
    And out of it, as Wind along the Waste,
    I know not Whither, willy-nilly blowing.

    http://www.arabiannights.org/rubaiyat/index2.html
    --
    A. Sinan Unur
    d
    (remove '.invalid' and reverse each component for email address)
    A. Sinan Unur, Jul 13, 2004
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. a

    Minimize window when Show

    a, Oct 10, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    514
  2. Latha Rajeev

    "Minimize event"

    Latha Rajeev, Jul 18, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    387
    Latha Rajeev
    Jul 18, 2003
  3. Jupiter49

    How to minimize /bin folder redundancy

    Jupiter49, Aug 20, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    298
    Jupiter49
    Aug 20, 2003
  4. Paul LeBlanc

    Re: How to minimize /bin folder redundancy

    Paul LeBlanc, Aug 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    298
    George Ter-Saakov
    Aug 21, 2003
  5. Erik  Bethke
    Replies:
    1
    Views:
    1,859
    Erik Bethke
    Feb 8, 2005
Loading...

Share This Page