Re: Verify if name contains an element of a list
Re: Verify if name contains an element of a list
- Subject: Re: Verify if name contains an element of a list
- From: kai <email@hidden>
- Date: Wed, 19 Apr 2006 22:29:18 +0100
On 19 Apr 2006, at 21:53, Adam Bell wrote:
I didn't realize that a statement like: "set name_list to
name_list's text items" was possible with a list. Learn something
every day.
Well, I cheated a bit. ;-)
A couple of statements earlier in the routine converted the list to
text:
set text item delimiters to return
set name_list to name_list as Unicode text
The inserted return characters act as markers to delineate the
original list. This then allows the usual tid-based text-to-text-item/
list-to-text alternations that characterise a typical AS search/
replace routine. So while the variable 'name_list' still refers to a
list (of sorts), it's not always a list in the AppleScript sense
(that is, having a class of list). At the end of the handler, the
paragraph delimiters are used to convert the text back into a final
list.
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden