It would appear that Putty is selective about which messages it responds to, as it has several modes in which it constrains the users atempts to size the window. You might try SetWindowPos, but I think you might be be out of luck in trying to automate this. If the application doesn't want to let you do it, it doesn't have to.

You could try using Win32::GuiTest and sending the appropriate sequence of messages to the frame window to adjust it size; ie. emulate the message sequence that would be generated when doing this manually. Something like BUTTON_1_DOWN on the lower right corner, MOUSE_MOVE to the required position, BUTTON_1_UP.

That's a guess. You'd need to use a message spy to log the manual process and then attempt to emulate it by using SendMessage(). This would probably work, but would be quite laborious to work out the right sequence.

As I said previously, I do not see any easy way of obtaining a handle to a console belonging to another process, and then persuading Win32::Console to use it.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^3: ActivePerl - Console manipulation - Win32 by BrowserUk
in thread ActivePerl - Console manipulation - Win32 by Zarkon

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.