• 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: Getting out of a infinite loop when using system events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting out of a infinite loop when using system events


  • Subject: Re: Getting out of a infinite loop when using system events
  • From: Nigel Smith <email@hidden>
  • Date: Tue, 31 May 2005 12:12:52 +0100

On 27/5/05 18:13, "Patrik B." <email@hidden> wrote:

> The script runs fine but when I try to add another repeat so it runs untill no
> more overflow text exists it runs forever and locks my machine.

Difficult to tell since you posted the working, rather than the broken,
script. But...

> tell application "InDesign CS-US"   --- this is the part that
> will make the text smaller proportionally but it loops forever if I add a
> repeat just before this. That depends on the myover to be false.

No mention of resettting myOver during each go round your repeat loop -- it
sounds as though you check just once, before the loop.

I don't have InDesign, but how about:

    <snip script>
    set theStory to parent story of theFrame

    repeat while not (overflows of theFrame)
        tell application "InDesign CS-US"
            --do keystroke stuff snipped
        end tell
    end repeat

If that isn't it, and you need to delay while the story reflows, add the
line:

    delay n -- where n is the number of seconds to delay for

...in your loop body.

HTH,

    Nigel

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Getting out of a infinite loop when using system events (From: "Patrik B." <email@hidden>)

  • Prev by Date: Re : Timeout on panther
  • Next by Date: Martin's Package-Opening Script
  • Previous by thread: Getting out of a infinite loop when using system events
  • Next by thread: a small problem
  • Index(es):
    • Date
    • Thread