Sendmessage understanding

Hi, how does the sendmessage node work. I would love to send another app a letter as keydown.

sendmessageTest.v4p (9.8 KB)

here is the official documentation:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644950(v=vs.85).aspx

most crucially you’ll have to know the window handle of your target app. use HandleFromCaption (Windows), HandleFromPoint(Windows) or WindowLists (Windows) to find out…

yes, I used setfocus, the windowhandle, nothing!

sendmessageTest_v2.v4p (14.4 KB)

works here, i selected telegram window handle and it was writing ‘22’ into the text field…

maybe the problem is that you use Change instead of TogEdge which results in sending every message twice…

you are on windows 10?

yes

I get nothing with notepad, in telegram I got the 22, but I thought ascii for B is 98.

this post explains why it doesn’t work for you in Notepad (or some other apps): https://stackoverflow.com/questions/11890972/simulating-key-press-with-postmessage-only-works-in-some-applications#11901591

what works though is using HandleFromPoint (Windows) with Mouse (Devices Global) to get the correct handle when hovering the notepad.

EDIT: and for ascii values try: ALT+T to bring up an ascii-table in vvvv

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.