Hello I'm trying to use winclip to write a script that does some rtf modification and having issues.
What I'm trying to do overall is the following.
1 - Take RTF formatted text in the clipboard and convert it to plain text with the formatting
2 - Modify the formatting codes (in the test case just moving where the bold ends)
3 - Send the text back to the clipboard and convert it back into rtf so it can be pasted back into a program like wordpad
as rtf formatted text.
Steps 1 and 2 are working. Step 3 through is throwing an error with the SetRTF command. It is throwing a variable name contains an illegal character.
In the test below I already have the text with the rtf codes in the clipboard. the SetRTF is throwing the error.
^k:: wc.iSnap() test := wc.GetText() wc.SetRTF(%test%) return