AutoHotkey Community

It is currently May 27th, 2012, 10:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: September 5th, 2005, 9:00 am 
Would like to see something related to this added to Fileappend, so that the contents can be copied to the clipboard and not just a file.

Fileappend,
(

Whatever text

), Clipboard ( if you could do clipboard > .exe, somehow would be even better.)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 5th, 2005, 12:43 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
If you want to put multiple lines of text on the clipboard with a continuation section, you can do that with this example:

Clipboard =
(Join`r`n ; CR+LF is more typical on the clipboard than LF-only).
Line 1
Line 2

) ; Leave a single blank line if you want "Line 2" to also end in CR+LF.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2005, 1:49 pm 
Offline

Joined: July 3rd, 2004, 1:03 pm
Posts: 121
I don't understand how you would correct the contents on the clipboard, so that it would have the normal CR of a Windows text/doc/rtf, but without pasting this to the hard drive first or manually editing each line.

Can you change/add the CR +LF, for each line, while still in the clipboard?

Could you give an example?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2005, 2:55 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I'm unaware of any typical plain text formats on the clipboard whose lines end in CR rather than CR+LF. However, there might be some that end only in LF.

If there is text on the clipboard whose lines end only in CR, you could convert each CR to CR+LF with StringReplace:
StringReplace, Clipboard, Clipboard, `r, `r`n, All


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2005, 1:32 am 
Offline

Joined: July 3rd, 2004, 1:03 pm
Posts: 121
Thanks again, Chris. The help and understanding that you provide is greatly appreciated.

To rearrange the clipboard (for this case) so that the copy had the same CR+LR as the orginal, I used-

StringReplace, Clipboard, Clipboard,`n,`r`n, All (changed `r to `n)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: sks and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group