Re: Netscape email scripting & pasting weirdness
Re: Netscape email scripting & pasting weirdness
- Subject: Re: Netscape email scripting & pasting weirdness
- From: John Delacour <email@hidden>
- Date: Wed, 20 Aug 2003 07:42:07 +0100
At 7:24 am +0100 20/8/03, John Delacour wrote:
You need either to know or to check which line ending is being used
in each case and set AppleScript's text item delimiters to the
proper character accordingly.
PS.
If you use 'paragraphs' rather than 'text item delimiters' you won't
have to distinguish, as you will see if you run this script:
set {f1, f2} to {"/tmp/f1", "/tmp/f2"}
set {f1, f2} to {f1 as POSIX file, f2 as POSIX file}
set {cr, lf} to {ASCII character 13, ASCII character 10}
set _lines to characters of "abcdefg"
open for access f1 with write permission
set eof f1 to 0
repeat with i in _lines
write i & cr to f1
end repeat
close access f1
open for access f2 with write permission
set eof f2 to 0
repeat with i in _lines
write i & lf to f2
end repeat
close access f2
{paragraphs of (read f1), paragraphs of (read f2)}
.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.