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

Re: [MacPerl] OT: Printing Many Files



At 10.07 -0400 1999.06.24, w e b s l a v e wrote:
>I used to use Frontier and two OSAX called AutoClick and AutoType (they were
>$5.00) to take care of those nasty unscriptable-dialogs...
>
>I could have used AppleScript too I suppose.
>
>How does MacPerl interface with OSAX?

MacPerl::DoAppleScript, Mac::AppleEvents, Mac::AppleEvents::Simple, or
Mac::Glue.

Here is a nice MacPerl solution to the stated problem.  All automatic, no
dialogs.

  #!perl -wl
  use Mac::Glue;
  opendir DIR, ':macscripts';
  chomp(my $pwd = `pwd`);

  # need full pathnames for Apple events
  my @files = map { "$pwd:macscripts:$_" } readdir DIR;

  $bb = new Mac::Glue 'BBEdit';
  $bb->print(\@files);

You might want to do checking for which files to print.  Whatever you want.
This works as you'd expect, I suspect.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

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