randallf Posted June 1, 2009 Report Share Posted June 1, 2009 Hello, Can anyone help me with how to put an 'enter' or CR in a text file after something like Variable Modify String: Append %T23% to Text File THANKS! To clarify my looped appends look like this STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345 And I want this STUFF - 12345 STUFF - 12345 STUFF - 12345 STUFF - 12345 STUFF - 12345 STUFF - 12345 Quote Link to comment Share on other sites More sharing options...
randallf Posted June 1, 2009 Author Report Share Posted June 1, 2009 I tried Variable Set %T69% to ASCII Char of 10 Variable Modify String: Append %T23% to Text File Variable Modify String: Append %T69% to Text File But I just end up with ASCII chars inbetween in the .txt file... I tried ASCII 13 as well and nothing seems to work... How do I put a CR/LF in there that 'notepad' will recognize? Quote Link to comment Share on other sites More sharing options...
kevin Posted June 1, 2009 Report Share Posted June 1, 2009 Have you tried clicking the checkbox 'Add Trailing CR/LF' in the Variable Modify String: Append %T13% to Text File command dialog? Here is another approach: Variable Set %T13% to ASCII Char of 13 // put CR in T13 Variable Set %T10% to ASCII Char of 10 // put LF in T10 Variable Set String %T13% "%T13%%T10%" // put CRLF in T13 Variable Modify String: Append %T13% to Text File // append to the file Quote Link to comment Share on other sites More sharing options...
randallf Posted June 1, 2009 Author Report Share Posted June 1, 2009 Have you tried clicking the checkbox 'Add Trailing CR/LF' in the Variable Modify String: Append %T13% to Text File command dialog? Here is another approach: Variable Set %T13% to ASCII Char of 13 // put CR in T13 Variable Set %T10% to ASCII Char of 10 // put LF in T10 Variable Set String %T13% "%T13%%T10%" // put CRLF in T13 Variable Modify String: Append %T13% to Text File // append to the file Yes sir I just found it thank you also nice to know how those work in tandem, CRLF that is, as I'd never seen it before (stands to reason)... thanks much! Quote Link to comment Share on other sites More sharing options...
guli34 Posted September 28, 2009 Report Share Posted September 28, 2009 Almost similar but this bring me one question with the clipboard How to Past CR /LF directly in the clipboard Example Variable modify sting append “ is red” to T 8% Variable modify sting append “ is blue” to T 12% Variable modify sting append T 8% to T 12% Variable modify sting save T 12% to clpboard I got when I paste the clipboard the balloon is blue the square is red but I want to get the balloon is blue the square is red Probably I have to use the clipboard append text but I’m not sure about this one? Quote Link to comment Share on other sites More sharing options...
stevecasper Posted September 28, 2009 Report Share Posted September 28, 2009 How to Past CR /LF directly in the clipboard Example Variable modify sting append “ is red” to T 8% Variable modify sting append “ is blue” to T 12% Variable modify sting append T 8% to T 12% Variable modify sting save T 12% to clpboard I got when I paste the clipboard the balloon is blue the square is red but I want to get the balloon is blue the square is red Probably I have to use the clipboard append text but I’m not sure about this one? Guliver, For what you're trying to do, you'll have to create a variable which contains the CR/LF values, then append that variable to your %T12% variable before appending the %T8% variable. Try this: // Based on your post, I will assume %T8% contains "The square" and %T12% contains "The balloon" Variable Set String %T8% "The square" Variable Set String %T12% "The balloon" // First we create the CR/LF variable: Variable Set %T1% to ASCII Char of 13 Variable Set %T2% to ASCII Char of 10 Variable Modify String: Append %T2% to %T1% // Now we can do what you were trying to do: Variable Modify String: Append " is red." to %T8% Variable Modify String: Append " is blue." to %T12% Variable Modify String: Append %T1% to %T12% Variable Modify String: Append %T8% to %T12% Variable Modify String: Save %T12% to Clipboard <REM2:Based on your post, I will assume %T8% contains "The square" and %T12% contains "The balloon"><TVAR2:08:01:The square><TVAR2:12:01:The balloon><REM2:First we create the CR/LF variable:><ASCIIC:1:1:13><ASCIIC:2:1:10><TMVAR2:08:01:02:000:000:><REM2:Now we can do what you were trying to do:><TMVAR2:07:08:00:000:000: is red.><TMVAR2:07:12:00:000:000: is blue.><TMVAR2:08:12:01:000:000:><TMVAR2:08:12:08:000:000:><TMVAR2:16:12:00:000:000:> Quote Link to comment Share on other sites More sharing options...
guli34 Posted September 28, 2009 Report Share Posted September 28, 2009 Thank you so much Scasper you have been a great help. I love this forum and ME. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.