Jump to content
Macro Express Forums

Detecting If Character Is Tab, Cr, Lf


Noggin the Nog
 Share

Recommended Posts

Tied in with my macro in the "capitalize first letter" post, I have been trying to detect a tab, carriage return and line feed in a selected block of text spanning several lines using the If Variable statement. This would be used going through the block of text one character at a time eg If Variable %T3% = tab, cr or lf where %T3% is one character.

 

I found a way to enter the code to detect a tab by very devious means but have been unable to detect cr and lf. Anyone have ideas how to detect all three?

Link to comment
Share on other sites

maybe you could use the Variable Set to ASCII Char command to initialize a string variable with the character you're looking for and then compare this variable with yours (%T3%)

 

you should easily find a complete ASCII table but if I remember :

ASCII (decimal) code for TAB is 10

ASCII (decimal) code for Carriage Return is 13

ASCII (decimal) code for Line Feed is 10

 

never tried that so I can't tell you if it really works :P

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...
 Share

×
×
  • Create New...