At 9:00 am -0600 13/10/03, James Reynolds wrote:
This is one way to do it:
on open these_items
repeat with this_item in these_items
set the_path to POSIX path of this_item
set result to do shell script "/Users/james/backatcha.pl \"" & the_path & "\""
This will break if there happens to be a " in the pathname. 'quoted form of' POSIX path of... takes care of all that.
What is needed is "perl some.pl f1 f2 f3 f4" so only one Apple event is needed; the file list can be build as a string and passed with a single do shell script call.
JD
How about:
on open these_items set args to "" repeat with this_item in these_items set args to args & quoted form of POSIX path of this_item & " " end repeat set result to do shell script "/Users/james/backatcha.pl " & args display dialog result end open
Save as an application.
And /Users/james/backatcha.pl is:
#!/usr/bin/perl
foreach $i (@ARGV) { print "I got: $i\n"; }
--
Thanks,
James Reynolds University of Utah Student Computing Labs [EMAIL PROTECTED] 801-585-9811