Jump to content
Macro Express Forums

Type clipboard without CR/LF also removes spaces


Recommended Posts

If I use the command "Type Clipboard Text" and use the "Ignore CR/LF" the resulting output has no spaces where the CR/LF 'characters' were.

 

If I examine the clipboard in Clipmate, there are spaces there. Maybe it adds them.

 

I would like to type the text with spaces but not CR/LF.

 

This would be preferable to asking Clipmate to remove the breaks. Adding interactions without programs always make life a bit more difficult.

 

Am I missing something?

 

I want to do this because I am renaming files and need to get rid of the CR/LF but not the space.

Link to comment
Share on other sites

There is no displayable character for the Carriage Return byte, nor for the Line Feed byte. So Clipmate may just be showing them to you as spaces to indicate that there is SOMETHING in those character positions. To keep the character positions in your text typeout, you need to do the same thing: change them to spaces. You can do that with the Replace Substring option of Variable Modify String.

 

Variable Set T98 to ASCII 13 (Carriage Return code)

Variable Set T99 to ASCII 10 (Line Feed code)

Variable Modify String append T99 to T98 (CR/LF is now in T98)

 

Variable Set String T1 from Clipboard (put your text into a variable where you can manipulate it)

Variable Modify String T1 Replace Substring %T98% with ' ' (two blanks) [all instances]

Type the T1 string rather than the clipboard

Link to comment
Share on other sites

  • 4 years later...

Rberg is correct but I would used named variables and not the ME3 "T" variables. EG %CR% and %LF%. And I wouldn't bother creating a third variable to combine them. I think this is a little more elegant.

Variable Set to ASCII Char 10 to %LF%
Variable Set to ASCII Char 13 to %CR%
Variable Modify String: Replace "%CR%%LF%" in %Clip% with " "
Link to comment
Share on other sites

Thanks for this post rberq, i was able to use this info!

Wowzer! Feedback on a post I made four years ago! Glad it helped you. Cory's solution IS more elegant, but I can't name variables because I'm still stuck in the ME3 world. Can't teach an old dog new tricks, as my Grandpa used to say. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...