Re: increment a variable
Re: increment a variable
- Subject: Re: increment a variable
- From: "Stockly, Ed" <email@hidden>
- Date: Thu, 03 Mar 2016 23:10:46 +0000
- Thread-topic: increment a variable
>As I don’t know how many frames will need to be placed, the repeat loop
>takes care of placing the correct number but I’m stumped on how to assign
>the variables to them. Quite possible I’m being dense and missing
>something obvious, but I can’t figure out how to do this.
Rjay, you're not being dense or missing anything obvious. AppleScript can
be dense at times and miss obvious things.
I've had a similar issue, and my solution was when I got the number from
the user, I immediately used a repeat loop to build a list:
Set myTextFrames to {}
Repeat userProvidedNumber times
Set the end of myTextFrames to ""
End repeat
———
myTextFrames —>> {"","","","",""}
Repeat with x from 1 to userProvidedNumber
Set item x of myTextFrames to textFrame x
End repeat
----
So instead of
variableNameX
you have
item x of myTextFrames
Does that make sense?
_______________________________________________
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