Hey folks,
I've written the following macro which swaps selected text with the contents of the clipboard. As you'll notice, it uses a 'Find' . I am hoping someone can think up a better way that doesn't use 'Find', since it clobbers the 'last searched for' thing.
It basically copies the currently selected text into clipboard 8, pastes the contents of clipboard 0, and then needs to shift the contents of clipboard 8 to clipboard 0. To do this, it switches back to 8, pastes the contents, uses a reverse find to match what was just pasted to the contents of clipboard 8, switches to clipboard 0 and cuts it in. Surely, there's a simpler way to do this.
I've written the following macro which swaps selected text with the contents of the clipboard. As you'll notice, it uses a 'Find' . I am hoping someone can think up a better way that doesn't use 'Find', since it clobbers the 'last searched for' thing.
It basically copies the currently selected text into clipboard 8, pastes the contents of clipboard 0, and then needs to shift the contents of clipboard 8 to clipboard 0. To do this, it switches back to 8, pastes the contents, uses a reverse find to match what was just pasted to the contents of clipboard 8, switches to clipboard 0 and cuts it in. Surely, there's a simpler way to do this.
Code: Select all
IfSel
Clipboard 8
Cut
Clipboard 0
Paste
Clipboard 8
Paste
Find Up Select "^c"
Clipboard 0
Cut
EndIf