• 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: Stuffit Commands and Lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stuffit Commands and Lists


  • Subject: Re: Stuffit Commands and Lists
  • From: "Marc K. Myers" <email@hidden>
  • Date: Thu, 21 Jun 2001 08:37:49 -0400
  • Organization: [very little]

> Date: Wed, 20 Jun 2001 23:54:41 +0100
> To: Applescript Mailing List <email@hidden>
> From: Pier Kuipers <email@hidden>
> Subject: Stuffit Commands and Lists
>
> Hi all,
>
> Is there a quick way to coerce a list of files to a list of aliases?
>
> I just wrote a little script that will compress a folder prior to
> backup, containing the following snippet, which I find a bit
> cumbersome...:
>
> choose folder with prompt "Please select a folder to be compressed:"
> tell application "Finder"
> set theContents to (every item of the result) as list
> set x to count theContents
> set p to 1
> set theFilesToStuff to {}
> repeat with i from 1 to x
> set theFilesToStuff to theFilesToStuff & (item p of theContents as alias)
> set p to p + 1
> end repeat
> end tell
>
> Any nice ideas out there?

If you're running a version of the OS later than 8.1, the Finder will
coerce a list of file specs into a list of aliases. Instead of

> set theContents to (every item of the result) as list

try

set theContents to (every item of the result) as alias list

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

[6/21/01 8:35:42 AM]


  • Prev by Date: Re: How do I hide an application?
  • Next by Date: AS getting slower why?
  • Previous by thread: Re: Stuffit Commands and Lists
  • Next by thread: Re: Stuffit Commands and Lists
  • Index(es):
    • Date
    • Thread