Re: 'include' statement in applescript
Re: 'include' statement in applescript
- Subject: Re: 'include' statement in applescript
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 25 Jan 2005 20:01:42 -0800
On 1/25/05 2:19 PM, "Michael Grant" <email@hidden> wrote:
> On Jan 25, 2005, at 3:43 PM, Graham Anderson wrote:
>
>> is there a way to make handlers run sequentially..one after the other
>> like
>> handler1()
>> handler2()
>> handler3()
>>
>> basically, handler1() completely finishes before handler2() begins....
>
> How about calling handler 2 from handler 1 and handler 3 from handler 2?
> Michael
The suggestions you got are all beside the point and totally unnecessary.
Every Applescript command or statement that is not enclosed in an 'ignoring
application responses' block directed at an external application is designed
to complete before the script moves on to the next statement. That's just
how it works. So you can do exactly that:
handler1()
handler2()
handler3()
and handler2 will not begin before handler1 is finished, and so on. If you
want to be absolutely certain, you can design each handler to return a
result, But, frankly, even when you don't, handler2 will wait until handler1
returns before starting.
Now maybe you have some very unusual commands to applications within the
handlers that don't complete before moving on. Those are rare but it's been
known to happen under special circumstances.
You'll have to provide examples of where you think this is not happening. If
you have no example just forget about it.
--
Paul Berkowitz
_______________________________________________
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