Re: Copy to list Question
Re: Copy to list Question
- Subject: Re: Copy to list Question
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 14 Apr 2009 17:37:44 -0400
You are trying to dynamically create variable names at runtime- that's
code generation, and it is slow and error-prone, especially in
AppleScript. Where are these numerically-suffixed variables coming
from? Can you not just make them a list in the first place?
On Tue, Apr 14, 2009 at 5:25 PM, Oakley Masten
<email@hidden> wrote:
> Hi All
> Can this be done?
> It says Var is not defined.
> How do I fix this?
>
> set Var1 to "Cat"
>
> set Var2 to "Dog"
>
> set Var3 to "Horse"
>
> set Var4 to "Bird"
>
> set ListAnimals to {}
>
> repeat with x from 1 to 4
>
> copy (Var & x) to ListAnimals
>
> end repeat
>
> ListAnimals
>
> Thanks
>
> Oakley
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden