Ask a Question related to Macromedia Director Lingo, Design and Development.
-
_Lars_ webforumsuser@macromedia.com #1
ReadLine extra characters "|"
I'm trying to read from a text file on a PC and when I use ReadLine I get extra "|" characters at the beginning (and sometimes the end) of lines. How the heck to I get rid of these?
Thanks for the help!
- Lars
_Lars_ webforumsuser@macromedia.com Guest
-
#26218 [Opn->Fbk]: mail() sends extra "RCPT TO: <>" to smtp host
ID: 26218 Updated by: pollita@php.net Reported By: bzheng at us dot nomura dot com -Status: Open +Status: ... -
#26218 [Opn->NoF]: mail() sends extra "RCPT TO: <>" to smtp host
ID: 26218 Updated by: iliaa@php.net Reported By: bzheng at us dot nomura dot com -Status: Open +Status: ... -
#26218 [Opn]: mail() sends extra "RCPT TO: <>" to smtp host
ID: 26218 User updated by: bzheng at us dot nomura dot com Reported By: bzheng at us dot nomura dot com Status: Open... -
#26218 [NEW]: mail() sends extra "RCPT TO: <>" to smtp host
From: bzheng at us dot nomura dot com Operating system: W2k server/IIS 5/PHP in CGI mode PHP version: 4.3.3 PHP Bug Type: ... -
mysterious module "Readline"??
This is a multi-part message in MIME format. ------_=_NextPart_001_01C37C6B.38F7F528 Content-Type: text/plain; charset="iso-8859-1"... -
_Lars_ webforumsuser@macromedia.com #2
Re: ReadLine extra characters "|"
This works, but it can't possibly be the right way to do this?!?
firstString = readToken(myFile,RETURN,RETURN)
trash = readChar(myFile)
trash = readChar(myFile)
secondString = integer(readToken(myFile,RETURN,RETURN))
trash = readChar(myFile)
trash = readChar(myFile)
Yuck!
_Lars_ webforumsuser@macromedia.com Guest
-
Word of Mouth Productions #3
Re: ReadLine extra characters "|"
newLine = whatYouReadFromTextFile
if newLine.char [1] = numToChar (10) then
put empty into newLine.char [1]
end if
if newLine.char [newLine.char.count] = numToChar (10) then
put empty into newLine.char [newLine.char.count]
end if
of course a possibly slower but more robust method would be to check each
character
When you read in each line just call it:
newLine = whatYouReadFromTextFile
newLine = CheckForLineFeeds (newLine)
-- put this in a movie script
on CheckLineForFeeds
newLine = numToChar (10) & "sldkfj" & numToChar (10) & "skdjf"
cnt = newLine.char.count
noFeeds = FALSE
repeat while noFeeds = FALSE
feedPos = offset (numToChar (10), newLine)
if feedPos > 0 then
put EMPTY into newLine.char [feedPos]
else
noFeeds = TRUE
end if
end repeat
return newLine
end
--
Craig Wollman
Word of Mouth Productions
phone 212 724 8302
fax 212 724 8151
[url]www.wordofmouthpros.com[/url]
"_Lars_" <webforumsuser@macromedia.com> wrote in message
news:bmq45i$1a7$1@forums.macromedia.com...extra "|" characters at the beginning (and sometimes the end) of lines. How> I'm trying to read from a text file on a PC and when I use ReadLine I get
the heck to I get rid of these?>
> Thanks for the help!
> - Lars
>
>
Word of Mouth Productions Guest



Reply With Quote

