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

[MacPerl] AE continues...



I may have bit off more than I could chew here. In the broken script below
I am trying to get a return count of the layouts in $file. Any pointers
would be appreciated.

==========Bad Code======================================

#!perl -w


use Mac::Apps::Launch;
use Mac::AppleEvents;
my @apps = qw(FMP3);


$file = "HD:Desktop Folder:jun 96 Converted";

LaunchApps([@apps],1) || warn($^E); # launch and switch to front


$evt = AEBuildAppleEvent('aevt', 'odoc',
                          typeApplSignature, 'FMP3',
                          0,0, "'----':TEXT(\@)", $file) or die $^E;




$rep = AESend($evt, kAEWaitReply) or die $^E;
print AEPrint($rep);
AEDisposeDesc $evt;
AEDisposeDesc $rep;



$miscobj = "obj{want:type('cDB '), from:null(), form:indx, seld:long(1)}";
$evt = AEBuildAppleEvent('core', 'cnte',
                          typeApplSignature, 'FMP3',
                          0,0, "'----':TEXT(\@),$miscobj, kocl:type(ctbl)")
						  or die $^E;

$rep = AESend($evt, kAEWaitReply) or die $^E;
print AEPrint($evt);
print AEPrint($rep);
AEDisposeDesc $evt;
AEDisposeDesc $rep;



exit;


__END__

--Darryl



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch