in reply to Re^5: How to close an application window in Background? (GuiTest PostMessage)
in thread How to close an application window in Background?

Yep. I did it. Error gone, but the functionality is not working.

I have added the following code.

sub WM_KEYDOWN{ 30 } sub WM_KEYUP{ 31 }

  • Comment on Re^6: How to close an application window in Background? (GuiTest PostMessage)
  • Download Code

Replies are listed 'Best First'.
Re^7: How to close an application window in Background? (GuiTest PostMessage)
by Anonymous Monk on Mar 21, 2014 at 11:53 UTC

    Yep. I did it. Error gone, but the functionality is not working. I have added the following code.

    Why did you add that code?

      Yep. I did it. Error gone, but the functionality is not working.

      I have added the following code.

      sub WM_KEYDOWN{ 30 } sub WM_KEYUP{ 31 }


      And I did this also insted of above one.
      use constant WM_KEYDOWN => 0x0100; use constant WM_KEYUP => 0x0101;


      Both did not work.

        And I did this also insted of above one.

        Congratulations, you found the right constants

        Both did not work.

        Well, hwndSendKeys () isn't perfect, but it did send ascii keys successfully to a background window

        What were you expecting it to do that it didn't do for you?