• 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: removing an item from a list [Was: Two Questions]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing an item from a list [Was: Two Questions]


  • Subject: Re: removing an item from a list [Was: Two Questions]
  • From: "Marc K. Myers" <email@hidden>
  • Date: Sun, 11 Feb 2001 16:25:00 -0500
  • Organization: [very little]

> Date: Sun, 11 Feb 2001 13:13:05 -0700
> Subject: Two Questions
> From: Byron Peterson <email@hidden>
> To: <email@hidden>
>
> Hello,
>
> I have two questions.
>
> First:
>
> What is the fastest way to remove an item from a large list (the list I9m
> working with has about 3000 items in it). The item I need to remove is in
> the middle of the list and it isn9t the same item every time?
>
> Second:
>
> Is there anyway to change the desktop picture via an applescript without
> opening the Appearance Control Panel?

An example of how to remove items from a list:

set theList to {"A", "B", "C", "D", "E", "F", "G"}
set listCnt to (count of theList)
display dialog "Which item do you want to remove?" default answer ""
set itemNbr to (text returned of the result) as integer
if itemNbr is 1 then
set theList to the rest of theList
else if itemNbr is listCnt then
set theList to items 1 thru (listCnt - 1) of theList
else
set theList to items 1 thru (itemNbr - 1) of theList & [optn-L]
items (itemNbr + 1) thru (count of theList) of theList
end if
theList

Where you see "[optn-L]", use the AppleScript continuation character,
which you get with that keyboard combination.

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[2/11/01 4:23:21 PM]


  • Prev by Date: Re: making new documents with Style
  • Next by Date: Simple question: List Folder
  • Previous by thread: Re: Two Questions
  • Next by thread: Re: removing an item from a list [Was: Two Questions]
  • Index(es):
    • Date
    • Thread