• 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: OSAX to Tokenize Record Field Names from List Items ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: OSAX to Tokenize Record Field Names from List Items ???
      • From: Luther Fuller <email@hidden>
References: 
 >OSAX to Tokenize Record Field Names from List Items ??? (From: Rick Gordon <email@hidden>)
 >Re: OSAX to Tokenize Record Field Names from List Items ??? (From: Luther Fuller <email@hidden>)
 >Re: OSAX to Tokenize Record Field Names from List Items ??? (From: Michelle Steiner <email@hidden>)
 >Re: OSAX to Tokenize Record Field Names from List Items ??? (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: OSAX to Tokenize Record Field Names from List Items ???
  • Next by Date: Re: OSAX to Tokenize Record Field Names from List Items ???
  • Previous by thread: Re: OSAX to Tokenize Record Field Names from List Items ???
  • Next by thread: Re: OSAX to Tokenize Record Field Names from List Items ???
  • Index(es):
    • Date
    • Thread