in reply to Re: ActivePerl - Console manipulation - Win32
in thread ActivePerl - Console manipulation - Win32

Yep...that option is disabled. I read first in google also. Didn't find anything. Also read tons of documentation, but nothing. This ... $MoveWindow->Call($targetHandle,1,1,500,500,1); doesn't do anything. This ... $MoveWindow->Call($targetHandle,1,1,10,10,1); .. make the widow in its minimum size with height 0; After this ... $MoveWindow->Call($targetHandle,1,1,500,500,1); ... its restores the window in its default size, but not 500x500. Any suggestions ? Do you think this will work if i use API's like ... GetConsoleScreenBufferInfo SetConsoleScreenBufferSize ???
  • Comment on Re^2: ActivePerl - Console manipulation - Win32

Replies are listed 'Best First'.
Re^3: ActivePerl - Console manipulation - Win32
by BrowserUk (Patriarch) on Aug 09, 2006 at 20:36 UTC

    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.