Jump to content
Sign in to follow this  
blizzedout

multiple lines into one

Recommended Posts

blizzedout

How do i make 10 lines into one line of text?

Share this post


Link to post
Share on other sites
BrettF

How do i make 10 lines into one line of text?

Um.... This worked for me:

$file = FileOpen (@ScriptDir & "\Test.txt", 0)
$lines = FileRead ($file)
MsgBox (0, "10 Lines:", "Lines:" & @CRLF & $lines)
$result = StringStripWS ($lines, 8)
MsgBox (0, "10 Lines:", "Result:" & $result)

Test.txt contained:

11
22
33
44
55
66
77
88
99
1010

Hope it helps :shocked:

Share this post


Link to post
Share on other sites
Helge

Maybe...

MsgBox(64, "", "Line 1" & @CRLF & "Line 2")oÝ÷ Øêâ~Ø^Ëkz·¥¢x2¢çëÞÚ,¢g­)à)¶¬jëh×6MsgBox(64, "", _
"Line 1" & @CRLF & _
"Line 2" & @CRLF & _
"Line 3" & @CRLF & _
"Line 4")

Edit : Not exactly too many details in your post though, blizzedout...

Edited by Helge

Share this post


Link to post
Share on other sites
JohnBailey

I agree with Helge, there was not too much info in the original question. Lines of what?

You can also do things like

$singleLine = $line1 & $line2 & $line3 oÝ÷ ÚÚºÚ"µÍÌÍÛ[LH [ÏH    ÌÍÛ[L

Good example bert

Edit: corrected AUI3 script synax (thanks JdeB)

Edited by JohnBailey

A decision is a powerful thing

Share this post


Link to post
Share on other sites
JohnBailey

HAHA! JdeB, thanks! That was bound to happen. That's what you get when you're scripting in different languages and platforms all day. JdeB, you're right. That's what I meant. I corrected my mistake above so nobody will be confused. haha thanks again for catching that.


A decision is a powerful thing

Share this post


Link to post
Share on other sites
JohnBailey

Or $return = StringReplace($file, @CRLF, ' ')

ooo xcal I like that! I never thought to use StringReplace that way before. Nice :shocked:


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.