Reputation: 11702
I have a program that I'm working on that register global hotkeys
I would like to use that ability to trigger highlighted text or data to be copied to the clipboard and then read from the clipboard into a variable in my program
which i will later use in reverse to paste it back out.
(example ctrl+1 copys to quque #1 and alt+1 pasts what is in quque 1)
thanks so much.
Upvotes: 4
Views: 5771
Reputation: 39
Well, you could possibly do a P/Invoke with SendMessage or even better SendInput Win32 APIs. That should be enough for you to simulate almost any key strokes.
James
Upvotes: 1
Reputation: 7709
You mean... like this?
Clipboard.SetText("whatever");
...or are you talking about copying text from any arbitrary window in another application? The latter is not trivial at all.
Upvotes: 7