• 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: Create variables from the script ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Create variables from the script ?


  • Subject: Re: Create variables from the script ?
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 26 Nov 2002 13:16:20 -0800

On 11/26/02 12:54 PM, "Thomas" <email@hidden> wrote:

> I was wondering if this would be possible to create variables from
> within the script. Here is a simple example :
>
> set list_folder to list folder "a folder"
> repeat with i from 1 to count of list_folder
> set vari to item i of list_folder
> end
>
> So i would get the name of the first folder in the variable var1, the
> name of the second folder in the variable var2... and the name of the
> nth folder in the variable varn.
> This is impossible right ?

Yes. The way you have it, you'll just be continually resetting your variable
vari to a new value without doing anything with it, except replacing it with
the next value. Instead of that, you could just set a variable to 'item i of
list_folder ' whenever you need to use a variable.


--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Create variables from the script ? (From: Thomas <email@hidden>)

  • Prev by Date: Re: Set creator code of a package don't work
  • Next by Date: Re: Set creator code of a package don't work
  • Previous by thread: Create variables from the script ?
  • Next by thread: Re: Create variables from the script ?
  • Index(es):
    • Date
    • Thread