Bart Lateur <bart.mediamind@tornado.be> writes: >I have looked over Matthias's AppleEvent cookbook, (called the "Perl >Anarchist's Cookbook"), where he describes five distinct ways to do the >same thing: controlling an app using AppleEvents. > >I have a strong feeling that not only the result is the same, but that >the underlying technicalities are basically the same too. In other >words: I expect that an Applescript, when compiled, results in basically >the same tree, as the one you can build yourself manually, using >AEBuild, which is Matthias's recommended method. Not quite. The AppleScript, when compiled, still ends up as a *program*, not just a series of AppleEvents. However, when that program is *executed*, it sends the same event as the AEBuild/AESend. >If that is correct, I'm willing to put a *lot* more energy into building >a general Applescript decompiler, than into learning how to build an >AEBuild structure for every (or even only one) application I want to >script. I don't think AppleScript can be decompiled easily. If you want to do something AppleScriptesque (some people find AEBuild more convenient), it might be better to create a Perlish dialect of AppleScript, that is, to parse terminology resources (doesn't somebody already have code for this?) and figure out a way to naturally map the terminology into a Perlish syntax. Matthias ----- Matthias Neeracher <neeri@iis.ee.ethz.ch> http://www.iis.ee.ethz.ch/~neeri "I'm set free to find a new illusion" -- Velvet Underground ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch