• 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: Getting label from a record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting label from a record


  • Subject: Re: Getting label from a record
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 17 Nov 2003 11:12:47 -0700

On Nov 17, 2003, at 2:56 AM, EBI Aktivitet wrote:

I'm trying to get a list of all the labels in a record. That is, not their
values, but the actual label name.

Here is a brute force method. I'm sure that someone will come up with something more elegant, but until then, this should suffice.

--Michelle

set my_record to {a:"record 1", b:"record 2", c:"record 3"}
set my_count to count my_record
try
set my_list to my_record as string
on error the_message
set text item delimiters to {"{"}
set the_message to text item 2 of the_message
set text item delimiters to {"}"}
set the_message to text item 1 of the_message
set text item delimiters to {":"}
set the_message to text items of the_message
set text item delimiters to {""}
set the label_list to {}
repeat with loop from 1 to my_count
copy the last character of item loop of the_message to the end of the label_list
end repeat
label_list
end try

--
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
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: 
 >Getting label from a record (From: EBI Aktivitet <email@hidden>)

  • Prev by Date: How to process attachments in Mail.app
  • Next by Date: Scripting Quicktime - SMIL Query
  • Previous by thread: Getting label from a record
  • Next by thread: Re: Getting label from a record
  • Index(es):
    • Date
    • Thread