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.
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!
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
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!
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.
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!
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!
Hi Joey,
Odd, glad to hear it's working though! If you have any other questions, feel free to reach out to us.
Thanks!