Error during command authentication.

Error - unable to initiate communication with LISTSERV (errno=10061, phase=CONNECT, target=127.0.0.1:2306). The server is probably not started. LISTSERV - MACSCRPT Archives - LISTSERV.DARTMOUTH.EDU

>Hello fellow Scripters:
>
>         Spam vs Ham aside, Applescript is doing something that I quite
>don't understand.  I have a small script looking like this:
>
>set FileName to "Macintosh HD:source code:Applescript
>Convert:TestScripts:Example 2" as alias
>
>set FileHandle to open for access FileName without write permission
>
>set buf to read FileHandle until return
>display dialog "|" & buf & "|"
>
>set tempbuf to read FileHandle before "$"
>display dialog "|" & tempbuf & "|"
>
>set tempbuf to read FileHandle before return
>
>display dialog "|" & tempbuf & "|"
>close access FileHandle
>
>
>The actual file from which data is being read looks like this for the
>first, say five lines:
>
>$$17$Y211419.003A$07$B$00410000$011208$
>
>$20$
>[TB1,48.0,48.0,516.0,276.0][LD14][RR][NH][LYNN][PS10][BF]This is
>page [SPGN][EBF].  Page size is 7.  A vermilion moon hung gibbous
>
>The first and second DISPLAY DIALOGs perform as expected, the first
>displaying the very first line of text and includes the RETURN character,
>the second displaying only a return character.  The third DISPLAY DIALOG,
>however, displays only a "20$" regardless of whether I am using READ
>BEFORE or READ UNTIL.
>
>I really, really need that dollar sign in the data that precedes the "20."
>  Can anyone suggest a remedy?
>

No idea why it's doing that, but, unless the file is gigantic, it may
work better to read in the whole thing and process it inside
Applescript. Like maybe

repeat with onePar in paragraphs of Filehandle
(do whatever you want with each line)
end repeat

Gets rid of the returns and you can just play with your dollar signs.
--

Bill Steele
[log in to unmask]