Hi, thanks. I had read those pages, and it didn't make much sense to me. I've added the sleep, and the line replacing `r with nothing.
Now I've got the code:
Code:
^e::
ClipSaved := ClipboardAll ; Save the entire clipboard
Clipboard = ; Clear the clipboard (useful for when there is no highlighted text)
Send ^c ; Copy the highlighted text to the clipboard
ClipWait, 1 ; Wait up to 1 second for the clipboard to contain data
if ErrorLevel ; If there is no data in the clipboard after 1 second, exit
{
MsgBox, The attempt to copy text onto the clipboard failed.
return
}
NewClipboard := Clipboard ; Assign the clipboard content to the variable
sleep,100
Clipboard := ClipSaved ; Restore the original clipboard
ClipSaved := ; Free the memory in case the clipboard was very large
StringReplace, NewClipboard, NewClipboard,`r,,All
return
^r::SendInput {raw}%NewClipboard%
When ^r this text here in IE it works ok, but then 1 second later it truncates the text to the following and adds it to the Preview Window
Code:
^e::
ClipSaved := ClipboardAll ; Save the entire clipboard
Clipboard = ; Clear the clipboard (useful for when there is no highlighted text)
Send ^c ; Copy the highlighted text to the clipboard
ClipWait, 1 ; Wait up to 1 second for the clipboard to contain data
if ErrorLevel ; If there is no data in the clipboard after 1 second, exit
{
The attempt to copy text onto the clipboard failed.
Something is going on beyond my ability to learn about and debug. I don't suppose you've got any other pointers? Or if anyone else is reading this do they know of any simple copy/paste autohotkey scripts?
Thanks for all your help.