News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

PostMessage Control

Started by bomz, July 02, 2011, 12:53:56 PM

Previous topic - Next topic

qWord

Quote from: bomz on July 02, 2011, 07:32:17 PM
for most but not for all. and send key may conflict with some programs and may send to another window if you lose focus
1. you set the focus immediately before emulating the input.
2. CTRL+c/v is well known key combination on Windows OSs - please show me a program that use this combination for other purpose!
3. I'm also sure: there is no solution for all programs - just thought of the case programs using GetAsyncKeyState for determining the status of CTRL or ALT.
FPU in a trice: SmplMath
It's that simple!

bomz

I find only one situation when CTRL+V block's with uvcrscreen camera. but Google say that this method is not universal. there is many such programs from Delphi programmers but any don't work fully correct



bomz

even 128 millisec OK with 75% processor use with video. WORD made orthography search it need bigger pause

qWord

in the attachment an example using SendInput() for both, console and GUI applications. Simply drag a line in listview and release the mouse over the target window/console (there is no dragging icon/image).
FPU in a trice: SmplMath
It's that simple!

bomz

????
http://xmages.net/storage/10/1/0/2/c/upload/a9adc793.gif

I make "method" WM_CHAR+sendkey VK_RETURN for Alkepad. Lose focus VK_RETURN was send for another application which open 300 windows. CTRL+V is safe key's, others may be dangerous and need attention

qWord

copy some text into the clipboard - this contend is shown in the list view. Then you can drag this entries back to other applications.
FPU in a trice: SmplMath
It's that simple!


bomz

it's good idea to drop text in window - this decide the problem's with windows without autofocus

qWord

yes, win7-x86-64 ... works perfect here, also when running it using OllyDbg ...  :(
FPU in a trice: SmplMath
It's that simple!

bomz

for universal program need do using XP and than try w7. from down to up

qWord

mhh, can't see the problem. However, you can see the code for conole input: first Set the console as forground window an the pass the text using SendInput()(). The trick is, to replace LFCR with VK_RETURN.
FPU in a trice: SmplMath
It's that simple!

bomz

text was big - 1 mb, I see film forgot about pasting, and move other window.

donkey

I haven't read this whole thread so forgive me if I'm off the mark here. However, from the first few posts I gather that you are having problems sending certain messages to a window in another thread using SendMessage but mysteriously PostMessage seems to work. That is becuase the input states of the two message queues are independant of each other, use AttachThreadInput to syncronize them then SendMessage should work fine.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable