• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Netscape email scripting & pasting weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Netscape email scripting (From: Nigel Smith <email@hidden>)
 >Netscape email scripting & pasting weirdness (From: Kelvin Aitken <email@hidden>)
 >Re: Netscape email scripting & pasting weirdness (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Netscape email scripting & pasting weirdness
  • Next by Date: Re: Strip characters without recursive loop
  • Previous by thread: Re: Netscape email scripting & pasting weirdness
  • Next by thread: Re: Netscape email scripting
  • Index(es):
    • Date
    • Thread