Re: Getting the labels of a record
Re: Getting the labels of a record
- Subject: Re: Getting the labels of a record
- From: Emmanuel <email@hidden>
- Date: Thu, 17 Apr 2003 17:09:43 +0200
At 12:19 AM -0400 17/04/03, Deivy Petrescu wrote:
On Saturday, March 8, 2003, at 08:09 AM, LE STANG Jean-Baptiste wrote:
I'm looking for a way to read the names of labels in a record. Does
anyone know how to do it?
A little late, but I used a script to get the values on the record,
however, it did not work well for cumbersome records.
It apparently works well for labels.
I tweaked it to work with labels, including date. It is not perfect.
I may have posted more or less that already, pardon me for that.
Smile gets the labels in a record: its "Object expert" allows the
user to edit any of the fields of the record which makes a Smile
object. For that, it does resolve the record got as "theObject as
record" (I make it simple here), which can contain all kinds of
labels I think, into labels + values. Even using Smile's proprietary
features, it's not simple.
Here is how it works, recursively. The idea is to save as much
parsing as possible.
1. Make the record into a string, using "display"
2. Find offset of first colon (that should be: find first colon *not
between pipes*) in the string
3. Extract label as a string
4. Get the corresponding value - by script - (if interested)
5. Use "suppress item" (which can address any kind of label) to chop
the first item out of the record.
6. If the record is not empty yet, loop to #1
Emmanuel
_______________________________________________
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.