In article <user-4286BB.07112207072007@[EMAIL PROTECTED]
>,
Sander Tekelenburg <user@[EMAIL PROTECTED]
> wrote:
> In article <C2B47E4F.1BC05%jhines@[EMAIL PROTECTED]
>,
> Jim Hines <jhines@[EMAIL PROTECTED]
> wrote:
>
> > Išve searched high and low, but canšt find an answer to this:
> >
> > Is it possible to call one applescript from within another
applescript?
>
> Yes. You can load scripts, call their functions, get the result
returned.
>
> Create this script and save it as a script:
>
> on doStuff(caller)
> return "I do what " & caller & " tells me to"
> end doStuff
>
> Next, create this script and save it as an applet:
>
> set otherScript to load script (choose file)
> tell otherScript to doStuff("Trigger")
> set aString to the result
> display dialog aString
>
> Launch that second script and when it asks to choose a file, point it to
> the first script.
You can also use the Run Script command. This will not update the target
script's properties, though, while Load Script (followed by Store Script)
will.
--
John Rethorst
jrethorst at post dot com


|