[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-Forum] Call script from AS with @ARGV list



Hi

I'd like to call a MacPerl script from Applescript with a list of
additional arguments

eg:
tell app "MacPerl"
    DoScript "runner" with args "one, two, three"
end tell

I can call scripts fine, its just the additional arguments that I'm
having trouble with. I came across this tantalising email in the
archives, which I have excerpted:

|*  Subject: Re: [MacPerl] Running droplets from AppleScript
|*  From: Stephan Somogyi <list@gross.net>
|*  Date: Mon, 16 Mar 1998 18:01:43 -0800
|------------------------------------------------------------------------
|At 11:41 -0800 13.3.98, I wrote:
|
|> There also doesn't seem to be a way to interrogate MacPerl about
|> whether it's currently running a script. Since the rest of my
|> AppleScript depends on the completion of the droplet's Perl script
|
|Thanks to Matthias, I sorted out my problem; since the solution isn't
|entirely intuitive, I thought I'd post it to the list in the hope that
|someone else might benefit from it.
|
|The main problem is that I was interpreting the aete entry for
|MacPerl's Do Script too literally. Instead of passing the entire Perl
|script to be executed as the first parameter, it's also possible to
|pass the path of a script (either a droplet or a text file -- both
|work); any further parameters are put in ARGV.

I'd be grateful if anyone could point me to a working example
applescript.

Thanks
Rory

--
		  Rory Campbell-Lange   +   The Campbell-Lange Workshop
 			                  London




==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-forum-request@macperl.org