Talk About Network

Google




Programming > Applescript > Re: How To Call...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 1481 of 1697
Post > Topic >>

Re: How To Call AppleScript Within AppleScript

by John Rethorst <nobody@[EMAIL PROTECTED] > Jul 7, 2007 at 10:20 AM

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
 




 3 Posts in Topic:
How To Call AppleScript Within AppleScript
Jim Hines <jhines@[EMA  2007-07-06 23:18:39 
Re: How To Call AppleScript Within AppleScript
Sander Tekelenburg <us  2007-07-07 07:11:22 
Re: How To Call AppleScript Within AppleScript
John Rethorst <nobody@  2007-07-07 10:20:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Tue Jan 6 2:50:15 PST 2009.