Re: Snippet to remove an item from a list
Re: Snippet to remove an item from a list
- Subject: Re: Snippet to remove an item from a list
- From: Michelle Steiner <email@hidden>
- Date: Mon, 9 Jul 2001 08:38:04 -0700
On 7/9/01 7:24 AM, Arthur J Knapp <email@hidden> wrote:
>
Here is the more traditional AppleScript technique:
Alternatively (slightly modifying Arthur's script):
on DeleteAt(lst, x)
tell the lst
if (x = 1) then
return the rest
else if (x = the length) then
return items 1 thru -2
else
return (items 1 thru (x - 1)) & ,
(items (x + 1) thru -1)
end if
end tell
end DeleteAt
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------