0

I need to Open a process (easy) and then somehow paste data from my application into this opened application into it's currently active textbox.

How can I get that done?

Joe
  • 1,091
  • 1
  • 11
  • 23

1 Answers1

0

using the windows clipboard seems like an easy option, if the user can paste manualy, or you control the code for both applications and can make both work with the clipboard

EDIT
Using win 32 api's send message can provide the answer as well, especially if you dont control the code for the process you want to write into, and want it to be 100% automatic. Check out these links

  1. https://stackoverflow.com/a/4539229/1394380
  2. How to send text to notepad
  3. win 32 api messaging with send message

The general steps for this solution are: to find the text box, using the FindWindow function and then send the text, using the send message. Note: As far as i understand, the receiving application, should yet have a handler for the message and update accordingly

Community
  • 1
  • 1
YavgenyP
  • 2,113
  • 14
  • 11
  • Yeah it should all be automatically, Clipboard could work, even though i'd have to erase a user's existing clipboard pastings. But I still don't understand the biggest issue, how one can paste something onto another process –  Jun 24 '12 at 16:54
  • its not pasting, its using a common mediator to allow both read and write operations to both processes. Ill edit my answer to provide another options as well – YavgenyP Jun 24 '12 at 17:00