Talk About Network

Google




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

Re: How To Call AppleScript Within AppleScript

by Sander Tekelenburg <user@[EMAIL PROTECTED] > Jul 7, 2007 at 07:11 AM

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.

-- 
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>

Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers sup****t Macs!"
 




 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 3:24:21 PST 2009.