Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Ozgur
3 discussion posts
Is it possible with macros to paste/insert predefined texts ?
Jul 10, 2017  • #1
PabloMartinez's profile on WallpaperFusion.com
Text from a file or directly written into the script?
Jul 10, 2017  • #2
User Image
Ozgur
3 discussion posts
I want to be able to paste some predefined texts which I do very often daily basis with some hotkeys. Not from a file.
Jul 10, 2017  • #3
PabloMartinez's profile on WallpaperFusion.com
The easiest solution I can see now. I'm sorry, I don't have much time to look for more detailed solutions.
Maybe Keith or someone else will write a more correct solution. If no one proposes anything, when I have more time, I will try to do so.

Code

using System.Text;

public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        var sB = new StringBuilder();
        
        // Append each string to new line
        sB.AppendLine("Your text");
        sB.AppendLine("Some other text");
        sB.AppendLine("And other");
        
        // Append numbers or text to one line
        sB.Append("...").Append(123).Append(456);
        
        // Paste all text to current active window
        BFS.Clipboard.PasteText(sB.ToString());
        return null;
    }
}
Jul 10, 2017  • #4
User Image
Ozgur
3 discussion posts
thank you I figured it out.
Jul 10, 2017  • #5
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)