Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Joey O57181
7 discussion posts
Hello,
I have been looking through the downloadable macros and can't find exactly what I am looking for.
I am looking for a macro that will take what I have copied and paste into a template I would pre write.
for example if I copy "Joey"
I would like to press a macro that would enter
Hello (insert paste),
How are you today?

thankyou for reading this and any help you can give.
Jun 24, 2021  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Joey,

I've attached a script below that should do this for you. If you attach a key combination to it, it will take the current copied text, and add the surrounding template to the paste.

You can adjust your template on line 16, I've added "Text1" and "Text2" as fillers. You can import the script by opening the ClipboardFusion Settings > Macros > Import.

Thanks!
• Attachment: Pasting Template.cfmacro [4,920 bytes]
Jun 25, 2021  • #2
User Image
Joey O57181
7 discussion posts
Owen This is exactly what I was looking for. You sir are awesome.
Is there anyway to add a button presses to this?
I basically was trying to have it paste.
Schedule of (insert paste)
*then press tab*
Hello,*press enter or just move to the next line*
Please advise on (insert paste)
*press the down arrow 4 times*
Joey
Jun 25, 2021  • #3
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Joey,

Glad to hear that worked for you! You can send keys by adding the following lines to your script where you would like them:

Tab Key: BFS.Input.SendKeys("{VK_9}");
Enter Key: BFS.Input.SendKeys("{VK_13}");
Down Arrow Key: BFS.Input.SendKeys("{VK_40}");

Hope that helps!
Jun 29, 2021  • #4
User Image
Joey O57181
7 discussion posts
So I tried to create what I was trying to accomplish but its giving me an error of
Run Failed.
Thread was being aborted.
[System.Threading.ThreadAbortException]

when ever I enter the

BFS.Input.SendKeys("{VK_13}");

Not sure what I'm doing wrong.

string TextCopied = BFS.Clipboard.GetText();
BFS.Clipboard.PasteText("Scheduling for " + TextCopied);
BFS.Input.SendKeys("{VK_9}");
BFS.Clipboard.PasteText("hello,");
BFS.Input.SendKeys("{VK_13}");
BFS.Clipboard.PasteText("Please advise on scheduling for " + TextCopied);
BFS.Input.SendKeys("{VK_40}");
BFS.Input.SendKeys("{VK_40}");
BFS.Input.SendKeys("{VK_40}");
BFS.Input.SendKeys("{VK_40}");
BFS.Input.SendKeys("{VK_40}");
BFS.Clipboard.PasteText("Joey");

This is what I had compiled and I was able to narrow it down to

BFS.Input.SendKeys("{VK_13}"); giving the error.
Jul 3, 2021  • #5
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Joey,

Strange, I copied that into a script on my end and it worked fine. Could you export the script itself and send it over?

Thanks!
Jul 5, 2021  • #6
User Image
Joey O57181
7 discussion posts
That is so odd. When I hit "run function" in the macro it gives me that error but when I just use the macro it works.

Well. That solves that.

thankyou so much!
Jul 7, 2021  • #7
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Joey,

Odd, glad to hear it's working though! If you have any other questions, feel free to reach out to us.

Thanks!
Jul 8, 2021  • #8
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)