Hi, can someone help me create a macro to do the following? In another program, Shift+Alt+B copies something to the clipboard (let's say it puts "Bob" there), and Shift+Alt+C copies something else to the clipboard (let's say "Carl"). I want to have a macro that will put "Bob Carl" (the results of Shift+Alt+B, a space, and the results of Shift+Alt+C). Ideally, the code will be clear enough that I can change the specific shortcuts involved (Shift+Alt+B or C) later if needed. Thanks!
To clarify, do you just need the macro to put the last 2 clipboard items together, or you need a macro to automatically copy some text from one program, then copy text from another program, then put them together?
I don't want to just combine the last 2 items. I want to use a hotkey to trigger a macro to do the following all in order without pausing:
1. Check if a window "Program" is active (do nothing if it is not, if it is then...)
2. Send Shift+Alt+B to the program, which will put "Bob" on the clipboard
3. Send Shift+Alt+C to the same program, which will put "Carl" on the clipboard
4. Combine Bob and Carl to put "Bob Carl" on the clipboard (actually, I'd like to be able to choose later whether to put a space or "new line" marker between them)
Then stop. And then I will be able to go to another program and use Control+V to paste "Bob Carl" in the other program.
Thank you!
Ok, give this a try! I'm not 100% sure it will work, it depends on whether the program will accept the sendkeys from ClipboardFusion.
Hi, unfortunately, it didn't work, but I'm sure it's the other program rather than you. Can we try your other idea--a script to concatenate the last 2 clipboard items with a space between them and put that on the clipboard, ready to paste? Thank you.
Aug 26, 2019 (modified Aug 26, 2019)
•
#5
Ok, try this one out then. Copy the first name first, then the second name, then run the macro, which should then put "FirstName LastName" on the clipboard.
Thanks, it works, but can you modify it so it concatenates the items and also pastes them at the current cursor location?
Also, can it concatenate with the 1st copied (i.e., older) item pasted in front of the 2nd copied item? So:
copy: first
then copy: second
[trigger macro]
pastes: first second
Oct 3, 2019 (modified Oct 3, 2019)
•
#7
Sure thing, give this one a try.
What would I need to add to this so that it automatically pasted the result where the cursor is?