Re: 'include' statement in applescript
Re: 'include' statement in applescript
- Subject: Re: 'include' statement in applescript
- From: Brian Johnson <email@hidden>
- Date: Tue, 25 Jan 2005 14:49:04 -0800 (PST)
On Tue, 25 Jan 2005, Graham Anderson wrote:
I was doing that before..but if you've got a fairly long script...it makes it
a bit harder to deal with
so, does applescript have some kind of include capability ?
if not, I'll go back to calling handlers within handlers :(
Here's a suggestion that might help. If you're using Script Editor on an
OS-X box, go to the file menu, pick "Open Dictionary". Scroll through the
list to "standard additions" and pick it. What you'll see is a list of the
commands that come built in to AS. Expand "Scripting Commands" to find
"load script". It does what you want to do.
Alternative, write hander1 as
on handler1(whatever)
.. lots of AS stuff ..
return "handler1 done at "&(current date) as text
end handler1
and save it as a stay-open application named "handler1". Repeat with
handlers 2 and 3. Now, write the main application:
set football to tell application "handler1" to handler1( params )
set baton to tell application "handler2" to handler2( football )
set buck to tell application "handler3" to handler3( baton )
display dialog "Handoffs:" & buck
So, it's easy to do even large projects in AS, as long as you work in a
modularized way. Good luck.
- brian johnson (etc)
_______________________________________________
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