• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Deleting last item of a List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Deleting last item of a List (From: email@hidden)
 >Re: Deleting last item of a List (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Making a list of IPs that try relaying on my Postfix server
  • Next by Date: RE: Making a list of IPs that try relaying on my Postfix server
  • Previous by thread: Re: Deleting last item of a List
  • Next by thread: Re: Deleting last item of a List
  • Index(es):
    • Date
    • Thread