1

So say I have a specific value on the Windows clipboard and after I paste it, I want another different specific value to be pasted.

Is it possible to write a hook in say...powershell...to catch the paste of a specific value, copy the new next-value to the clipboard so I can paste the next link in the chain as it were?

leeand00
  • 25,510
  • 39
  • 140
  • 297
  • https://stackoverflow.com/q/44996734/478656 might answer your question ("no, there's no clipboard event for another program reading from the clipboard, and you can't hook global events from .Net"). What is the chain, what is the real task? – TessellatingHeckler Oct 10 '18 at 06:48
  • @TessellatingHeckler There are 4 drop downs connected to a database (no access to it) in an old Windows 32 Application (a ticketing system) still used by the place that I work. When you try to fill them in it takes like 4 seconds for the value to fill in. If you type it absolutely perfectly it doesn't bother with the db call and just fills it in. Combining them all together it becomes slow and cumbersome to fill in between phone calls. If I used a chain of copy-paste values it would go so much faster. – leeand00 Oct 10 '18 at 14:42
  • 2
    I would look towards trying to script-type instead of hooking the clipboard, either https://stackoverflow.com/questions/17849522/how-to-perform-keystroke-inside-powershell or if you have any chance to install software, maybe AutoHotkey. If you can get the keyboard input right and it has common keyboard navigation support you can probably type/tab/tab/type/tab through all the fields and their values in one continuous run. – TessellatingHeckler Oct 11 '18 at 05:43

0 Answers0