At 17.41 -0400 1999.07.26, Cameron Ashby wrote: >I'm writing an special purpose application to remote control an installation >of a large number of Macs from a single administrative Mac running MacPerl. >I'd prefer to avoid installing MacPerl on all of the clients. > >I have a prototype that works using MacPerl::doAppleScript, but is, >unsurprisingly, quite slow. I would like to generate AppleEvents from perl, >but will use precompiled AppleScript through OSA if AppleEvents are going to >be a tremendously difficult thing to do. > >After I crashed my Mac a few times, I searched through the archives of this >list and noticed an old discussion thread regarding addressing remote >AppleEvents. I got the impression I might be out of luck. Has work been >done recently on working out how to construct an AEDesc of type 'targ'? Is >there any kind of MacPerl interface to the PPCToolbox (alpha quality even)? > >I'd be happy to tackle the task of implementing the pieces I need if it's >not going to stall my project. At first glance, it seems that packing a >target AEDesc and/or binding the PPCToolbox into MacPerl shouldn't be too >painful, but I'm no Mac guru. > >Can anyone who's worked on MacPerl AppleEvents or related code give me a >better sense of the scale of this? Any advice or pointers to documentation >or code I should look over would also be appreciated. Apple events and OSA stuff are becoming quite easy to use in many cases (see Mac::Glue, Mac::AppleEvents::Simple, Mac::OSA::Simple, macperlcat, all on <URL:http://pudge.net/macperl/>). However, I have not found any way of reliably (manually) packing a PPC address. I have been successful in packing one with the use of the PPC Chooser, though. So if you want to get a dialog box every time you connect to another machine (which you often need to do anyway, since you need to log in to the other machine), then it might be a sufficient solution. Now, PPC addresses don't work with Mac::Glue or Mac::AppleEvents::Simple (yet, it is on my TODO list), but they work fine with Mac::AppleEvents, once you get them. Here is the basic gist of getting such an address (the syso\ppcb event will present the PPC Chooser): use Mac::AppleEvents::Simple; do_event(qw(misc actv MACS)); # activate Finder my $app = do_event(qw(syso ppcb MACS))->data->data->get; # get address Now use it: my $evt = AEBuildAppleEvent(qw(clas evid), typeTargetID, $app, kAutoGenerateReturnID, kAnyTransactionID, $parameters) or die $^E; I don't know if proper packing of PPC addresses is being worked on in the next socket code, perhaps Matthias can answer that. It is certainly something that is needed. Hope that helps, -- 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