• 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: "Jacopille, David" <email@hidden>
  • Date: Thu, 03 Mar 2016 22:59:24 +0000
  • Thread-topic: increment a variable

RJay

An arbitrary quantity of variables like frame1, frame2, means you might
just need an ordered way of referencing those text frames again.

Storing the reference to the frame directly in the list might be a simple
alternative for you.

set frameList to {}
                repeat with x from 1 to arbitraryAmount
        set frameList to frameList & (make new text frame)
                end repeat


Both these approaches are direct references:
text frame “frame1”
item 1 of frameList

But the way you’d have to store those references is not.  In the first
case you’re storing just the name of the text frames.  In the second case
you’re storing fully qualified references like ‘text frame id 721 of
spread id 251 of document id 12’.

Pick what’s best for you.

Dave




On 3/3/16, 3:43 PM, "RJay Hansen" <email@hidden> wrote:

>I’m working on an InDesign script. I need to place a user specified
>number of frames on a page. I want to assign a variable to each frame as
>it’s placed so I can easily go back and put content in them. I’m setting
>up a repeat loop to place the frames. I would like to use frame1, frame2,
>frame3 etc as my variable names. 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.
>
>Thanks for any tips/ideas,
>
>RJay
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>AppleScript-Users mailing list      (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>.com
>Archives: http://lists.apple.com/archives/applescript-users
>
>This email sent to email@hidden

MFS Email system made the following annotation
---------------------------------------------------------------------------------------------------------------------------------------
This email communication and any attachments may contain proprietary, confidential, or privileged information. If you are not the intended recipient, you are hereby notified that you have received this email in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. The sender does not waive confidentiality or any privilege by mistransmission. If you have received this email in error, please notify the sender immediately, delete this email, and destroy all copies and any attachments.

 _______________________________________________
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>)

  • Prev by Date: Re: increment a variable
  • Next by Date: Re: increment a variable
  • Previous by thread: Re: increment a variable
  • Next by thread: Re: increment a variable
  • Index(es):
    • Date
    • Thread