• 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: increment a variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: increment a variable


  • Subject: Re: increment a variable
  • From: RJay Hansen <email@hidden>
  • Date: Fri, 04 Mar 2016 08:55:06 -0600

Thanks to all who replied. Brian, I was aware of addressing with their application id and the reasons for doing that, but thanks for the heads up. I think David and Ed’s suggestions which are along the same lines are the solution I need. I was working on something like that but having trouble figuring out how to implement it. Really appreciate the help and suggestions.

RJay

> On Mar 3, 2016, at 5:10 PM, Stockly, Ed <email@hidden> wrote:
>
>
>> 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


References: 
 >increment a variable (From: RJay Hansen <email@hidden>)
 >Re: increment a variable (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: AppleScript is now deliberately annoying me to death
  • Next by Date: Re: Applescript count mail attachment error
  • Previous by thread: Re: increment a variable
  • Next by thread: Insert page in Preview
  • Index(es):
    • Date
    • Thread