Re: OSAX to Tokenize Record Field Names from List Items ???
Re: OSAX to Tokenize Record Field Names from List Items ???
- Subject: Re: OSAX to Tokenize Record Field Names from List Items ???
- From: Michelle Steiner <email@hidden>
- Date: Sat, 23 Jun 2007 11:58:32 -0700
On Jun 23, 2007, at 11:00 AM, Luther Fuller wrote:
on run
set aList to {"recName", 5}
set scriptText to "{" & (item 1 of aList) & ":" & (item 2 of
aList) & "}"
set aRec to run script scriptText
display dialog (recName of aRec)
end run
And here is a generic solution:
on run
set scriptText to "{"
set aList to {"recName", 5, "rec2", 2, "rec3", "\"third record\"",
"rec4", true, "rec5", false}
repeat with i from 1 to (count aList) by 2
set scriptText to scriptText & (item i of aList) & ":" & (item (i +
1) of aList) & ","
end repeat
set scriptText to text 1 through -2 of scriptText
set scriptText to scriptText & "}"
set aRec to run script scriptText
end run
-- Michelle
--
"The past is like a foreign country. They do things differently
there." --Leslie Poles Hartley
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden