• 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: email@hidden
  • Date: Fri, 19 Nov 2004 06:23:07 -0500

Can't seem to delete the last item of a list. ... the last item is an empty character, most likely a return character, which shows up as "" ... the last empty item might be a space too, ...

-----

set list01 to {"Konrad Adenauer", "Ludwig Erhard", "Kurt Georg Kiesinger", "Willy Brandt", "Helmut Schmidt", "Helmut Kohl", "Gerhard Schroeder", return}

if ((list01 ends with "") or (list01 ends with " ") or (list01 ends with return) or (list01 ends with (ASCII character 10))) then set list01 to (items (1) thru ((count list01) - 1) of list01) as list

list01

-----

To test - replace 'return' in list01 with "", " ", (ASCII character 10) , (ASCII character 13), and even "
" [yes, press the space bar between the first " and second "], as well as - other text.


--

SJWL
_______________________________________________
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


  • Follow-Ups:
    • Re: Deleting last item of a List
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Sending mail with attachment
  • Next by Date: Re: Simple text formatting in Quark6
  • Previous by thread: Re: Deleting last item of a List
  • Next by thread: Re: Deleting last item of a List
  • Index(es):
    • Date
    • Thread