Re: How do I Read and Write a list to a file
Re: How do I Read and Write a list to a file
- Subject: Re: How do I Read and Write a list to a file
- From: Sander Tekelenburg <email@hidden>
- Date: Wed, 6 Nov 2002 14:28:54 +0100
At 00:12 -0800 UTC, on 11/6/02, Alan Kimelman wrote:
>
I have been unable to write a list to a file and read it again as a
>
list. Instead, the Applescript returns a string.
>
>
set t to {"abc", "def"}
[...]
>
write t starting at 1 to y as list
[...]
>
z returns a string "listTEXTabcTEXTdef" that is meaningless to me.
You're using AppleScript 1.5, right? Writing anything but text/string to a
file was broken in that version of AS (and was at least problematic in some
earlier versions as well, I believe). That's why you're getting those
results. Nothing to do with your code (except for needlessly coercing a list
into a list ;)).
The only option is to either
1) coerce your list to to text before writing to disk, and coerce back to
list after reading, or
2) upgrade to a more up to date version of AS. I think this particular bug
was fixed in AS 1.6. But 1.8.3 is the most current version for pre-Mac OS X.
In any case, avoid AS versions 1.5 and 1.7.
HTH
--
Sander Tekelenburg, <
http://www.euronet.nl/~tekelenb/>
_______________________________________________
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.