Re: Getting out of a infinite loop when using system events
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