in reply to Sending The key {ENTER} using WMSetText function in win32 module.

If you are talking about the Win32::GuiTest module (please be specific when posting, How do I post a question effectively?) SendKeys "Sends keystrokes to the active window as if typed at the keyboard", I added the empahsis to this quote. You can't use this to send keystrokes to windows which are not active.

The Win32::GuiTest method WMSetText is an interface to WM_SETTEXT, which also only sets the text of an active Window. This is not a perl or Win32::GuiTest specific thing. This is how the interface is designed.

Update: Please read the following conversation in the responses below. Thanks Anonymous Monk.

Replies are listed 'Best First'.
Re^2: Sending The key {ENTER} using WMSetText function in win32 module.
by Anonymous Monk on Feb 13, 2014 at 11:53 UTC
    um, no , you linked the postmessage constant, which can be used with a hwnd which is not active

    the guitest docs say  $set = WMSetText($hwnd,text) where $hwnd is the id of the window

    Its not unlike hwndSendKeys

    win32 is for real programmer -- there is nobody to help :D

      I'm sure OP would appreciate a short but complete example illustrating how this can be achieved. Thanks. Apologies, I've never found MSDN documentation to be great to use :)