Re: Extracting from text [Lecture]
Re: Extracting from text [Lecture]
- Subject: Re: Extracting from text [Lecture]
- From: "Marc K. Myers" <email@hidden>
- Date: Thu, 28 Feb 2002 18:40:18 -0700
- Organization: [very little]
>
Subject: Extracting from text [Lecture]
>
Date: Thu, 28 Feb 2002 18:29:02 +0000
>
From: Nigel Garvey <email@hidden>
>
To: "AppleScript Users" <email@hidden>
>
>
Although this is, as I've said, now well known, I've seen several
>
well-respected scripters over the past week give the following advice in
>
respect of path strings:
>
>
set AppleScript's text item delimiters to {":"}
>
set parentPath to (text items 1 thru -3 of folderPath) as string
>
>
This isn't perhaps as potentially calamitous as listing and then coercing
>
the individual characters of a large text, but its use does seem to
>
suggest that the authors don't know about the equivalent 'text'
>
construction, which is (in its simplest form):
>
>
text 1 thru text item -3 of folderPath
If you use "text item -3" the script would have to create a list of the
text items in order to identify text item -3, right? That's a much
different situation than extracting a substring from a string using the
"text" command. Does it really save anything in that case? It seems
that it would be more complicated, internally, to mix "text" and "item" terminology.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[2/28/02 6:38:24 PM]
_______________________________________________
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.