Re: Deleting last item of a List
Re: Deleting last item of a List
- Subject: Re: Deleting last item of a List
- From: Hanaan Rosenthal <email@hidden>
- Date: Fri, 19 Nov 2004 09:46:03 -0500
How about this one:
ignoring white space
if last item of theList = "" then
set theList to items 1 thru -2 of theList
end if
end ignoring
It also takes into consideration if the last item has any combination of tabs. returns, spaces, etc.
Hanaan
On Nov 19, 2004, at 8:32 AM, Michelle Steiner wrote:
On Nov 19, 2004, at 4:23 AM, email@hidden wrote:
if ((list01 ends with "") or (list01 ends with " ") or (list01 ends with return) or (list01 ends with (ASCII character 10))) then
if last item of list01 is in {""," ",return, ascii character 10} then
set list01 to (items (1) thru ((count list01) - 1) of list01) as list
set list01 to items 1 through -2 of list01
--
Prius: Kicks Gas
_______________________________________________
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
--
"This would clearly be an outstanding choice (if not THE best choice)"
"Just plain excellent; the best out there. Hunker down with it and enjoy!"
"it's the best guide to AppleScript since the original Language Guide. And it brings everything up to date."
www.customflowsolutions.com/pages/applescriptbook.html
Got your copy?
_______________________________________________
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