Home  |  Linux  | Mysql  | PHP  | XML
From:kurtz le pirate Date:Fri Jun 29 10:26:03 2007
Subject:Re: passing arguments: AppleScript to MacPerl
In article <200706290136.l5T1aQJU012861@merlin.enst.fr>,
 pouzin@email.enst.fr (Louis Pouzin) wrote:

> Hi,
> 
> Calling a macperl script (dog) from AS, with arguments a, b c, would read:
> 	tell perl to do script {dog, a, b, c}
> 
> Assuming that a, b, c are strings, they are copied to @ARGV in dog.
> 
> The problem I have is passing a list of arguments, e.g.
> 	set names to selection -- nb of selected objects not predictable
> 	tell perl to do script {dog, names} -- names conversion fails
> 
> Then I can converts names to a list of strings:
> 	set snames to {}
> 	repeat with nam in names
> 		set snames to snames & (nam as text)
> 	end repeat
> 	tell perl to do script {dog, snames} -- dog is called, @ARGV is empty
> 
> dog could be:
> 	$\ = "\n"; # print with EOL
> 	print "nb args: ", scalar @ARGV;
> 	$" = "\n"; # separator
> 	print "@ARGV";
> 
> Could anyone suggest a way around ?
> 
> Thanks

 - google is your friend.

 - <http://www.bradrice.com/wposx/archives/42>



-- 
klp
Navigate in group perl.macperl at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants