• 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: Set Selection with a list of items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set Selection with a list of items


  • Subject: Re: Set Selection with a list of items
  • From: John W Baxter <email@hidden>
  • Date: Sat, 6 Oct 2001 15:15:31 -0700

At 11:11 -0700 10/6/2001, Michelle Steiner wrote:
>On 10/6/01 11:05 AM, Irwin Poche <email@hidden> wrote:
>
>>Now I know why I was stumped. What never dawned on me was that my single
>>item command had "items" in it but the list form had neither "items" nor
>>"file" in it.
>>
>>I thought that adding "item" to the assign statement would do it. Either
>>"item" or "file" attempts to resolve at compile time...
>
>Um, no. They don't.
>
>> set selectionItems to {,
>> {item "Note Pad File", item "Scrapbook File"}, ,
>> "Main Identity", ,
>> "Hosts"}
>>
>>It looks like I have no choice but to use a loop to either set up the an
>>appropriate list -or- to set each item individually. Do you agree ?
>
>I don't know. I'm not sure what you're trying to do or how you're trying
>to do it, other than select a number of icons in a folder.

This worked for me in Mac OS 9. (Note...if the folder isn't already open,
substitute
reveal them
for
select them
...and I'm retyping since I'm using Eudora in Mac OS X 10.1 on another machine.
tell application "Finder"
set theFolder to systemFolder
tell theFolder -- this just saves a little typing if there are more files
set them to get {"Note Pad File", "Scrapbook File"}
--the "get" isn't really needed, but this is a rare case where I'd
use it
end tell
select them
end tell

--John
--
John Baxter email@hidden Port Ludlow, WA, USA


References: 
 >Re: Set Selection with a list of items (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Scripting Palm Desktop --- syntax to modify Custom fields
  • Next by Date: Re: Where is Script Menu?
  • Previous by thread: Re: Set Selection with a list of items
  • Next by thread: Re: Set Selection with a list of items
  • Index(es):
    • Date
    • Thread