win32 postmessage shift enter

0

I'm trying to send Shift+Enter key combination (new line in a textbox) to a window. I have already tested code below with no output:

win32gui.PostMessage(handle, win32con.WM_KEYDOWN, win32con.VK_SHIFT, 0)
win32gui.PostMessage(handle, win32con.WM_KEYDOWN, win32con.VK_RETURN, int('0x1C0001',0))
win32gui.PostMessage(handle, win32con.WM_KEYUP, win32con.VK_RETURN, int('0xC0000001',0))
win32gui.PostMessage(handle, win32con.WM_KEYUP, win32con.VK_SHIFT, 0)

I know that SendKeys may work but I want to use the function when the target window does'nt have focus or other events and programs are running.
Any ideas?

python
input
pywin32
win32gui
asked on Stack Overflow May 14, 2015 by raitech

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0