Hi: The error message I get says "Too few arguments." Here is the FMP AE log from aete.converter: @EVENT "count", "Return the number of elements of a particular class within an object", 'core', 'cnte' @REPLY 'long', "The number of elements", REQ, SINGLE, NOENUM @DIRECT 'obj ', "The object whose elements are to be counted", REQ, SINGLE, NOENUM, NOCHANGE @PARAM "class", 'kocl', 'type', "The class of the elements to be counted", REQ, SINGLE, NOENUM And here are entries for "database" and "layout" from the same log: @CLASS "database", 'cDB ', "A FileMaker Pro database" @PROPERTY "best type", 'pbst', 'type', "The best descriptor type", SINGLE, NOENUM, RDONLY @PROPERTY "class", 'pcls', 'type', "The class", SINGLE, NOENUM, RDONLY @PROPERTY "default type", 'deft', 'type', "The default descriptor type", SINGLE, NOENUM, RDONLY @PROPERTY "name", 'pnam', 'itxt', "The name of the database", SINGLE, NOENUM, RDONLY @PROPERTY "lock", 'pLCK', 'lock', "The current session's lock on the database", SINGLE, ENUM, RDONLY @PROPERTY "current layout", 'pCLY', 'obj ', "The current layout", SINGLE, NOENUM, RDWR @PROPERTY "current record", 'pCRW', 'obj ', "The current record", SINGLE, NOENUM, RDWR @PROPERTY "access", 'pACS', 'accs', "The access privileges", SINGLE, ENUM, RDONLY @ELEMENT 'ctbl', 'name', 'indx', 'rele', 'rang', 'test', 'ID ' @ELEMENT 'cSCP', 'name', 'indx', 'rele', 'rang', 'test', 'ID ' @CLASS "layout", 'ctbl', "A FileMaker Pro layout" @PROPERTY "best type", 'pbst', 'type', "The best descriptor type", SINGLE, NOENUM, RDONLY @PROPERTY "class", 'pcls', 'type', "The class", SINGLE, NOENUM, RDONLY @PROPERTY "default type", 'deft', 'type', "The default descriptor type", SINGLE, NOENUM, RDONLY @PROPERTY "name", 'pnam', 'itxt', "The name of the layout", SINGLE, NOENUM, RDONLY @PROPERTY "ID", 'ID ', 'long', "The unique ID of the layout", SINGLE, NOENUM, RDONLY @PROPERTY "access", 'pACS', 'accs', "The access privileges of the layout", SINGLE, ENUM, RDONLY @PROPERTY "protection", 'ppro', 'prtn', "Indicates whether the formulas of the cells in the layout can be changed", SINGLE, ENUM, RDONLY @PROPERTY "lock", 'pLCK', 'lock', "The lock on the layout", SINGLE, ENUM, RDONLY @PROPERTY "kind", 'pKND', 'tblt', "The kind of layout (View = FileMaker Pro layout, table = all fields i.e. layout 0)", SINGLE, ENUM, RDONLY @PROPERTY "visible", 'pvis', 'bool', "Is the layout visible in the layouts menu?", SINGLE, NOENUM, RDONLY @ELEMENT 'ccol', 'name', 'indx', 'rele', 'rang', 'test', 'ID ' @ELEMENT 'crow', 'name', 'indx', 'rele', 'rang', 'test', 'ID ' @ELEMENT 'ccel', 'name', 'indx', 'rele', 'rang', 'test', 'ID ' @ELEMENT 'cRQT', 'name', 'indx', 'rele', 'rang', 'test', 'ID ' -Darryl Caldwell darrylc@eznet.com On Sun, 29 Mar 1998, Tim Endres wrote: > You don't explain why the script is broken, and since I do not > have FMP3, I can't run it to see what happends. > tim. > > -----Original Message----- > From: Darryl Caldwell [SMTP:darrylc@foothills.eznet.com] > Sent: Saturday, March 28, 1998 9:21 PM > To: mac-perl@iis.ee.ethz.ch > Subject: [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 > > ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch