Re: "move the contents of a document into a variable/record..."
Re: "move the contents of a document into a variable/record..."
- Subject: Re: "move the contents of a document into a variable/record..."
- From: g3pb <email@hidden>
- Date: Tue, 21 Nov 2000 18:41:21 -0900
(* below is the contents of file 'x' on the desktop
fname
rich
lname
allen
state
ak
*)
set fRef to open for access file "iMac:desktop folder:x"
set aString to {}
-- read til end of file
try
repeat until false
set dLine to read fRef before return
copy dLine to the end of aString
end repeat
end try
set aRec to {}
repeat with i from 1 to number of items in aString by 2
set bRec to run script ("set bRec to ,
{" & item i of aString & ":\"" & item (i + 1) of aString & "\"}")
set aRec to aRec & bRec
end repeat
-- hcir
mailto:email@hidden
>
thank you very much for everyone's input...
>
>
i now hove it work but am now faced with a new dilemma, coercing a String into
>
a Record.
>
>
anyone know of an AS addition that can turn this into a one line resolution ?
>
>
i know how to parse this, one line at a time, but i hope to hear about
>
something more efficient.