At 8:11 am -0400 01/06/02, Chris Nandor wrote: >At 12:57 +0100 2002.06.01, Alan Fry wrote: >>At the very end of GraphicConverter's Manual it tells you how to >>convert graphic files from one format to another. Based on that >>'recipe' the following AEBuild (surprisingly enough) works: >> >> $evt = AEBuildAppleEvent( >> 'gcSt','xCnf', 'sign', 'GKON', 0, 0, >> qq( >> kysc:TEXT(\@), >> kytg:TEXT(\@), >> kywf:1 >> ), $source, $target >> ) or die $^E; >> >>where $source and $target are full-path file-names. >> >>However I simply cannot find an event 'xCnf' of class 'gcSt' nor any >>of the keys anywhere in the GraphicConverter 'aete' resource. Can >>anyone shed any light on this? > >aete resources exist to help other programs (Script Editor) and people to >use Apple events with that program/library. But they do not necessarily >have a direct relationship with the actual events and classes available in >the program/library. IOW, the aete resource appears to be incomplete.
Ah, thanks. So that's it. I had na�vely assumed that any application would only be capable of whatever was actually in the 'aete' resource. > >A frustration with the script is that it opens a window while the >>conversion goes on, although nothing is actually drawn in the window. >>Can anyone suggest a way of stopping the window being drawn or >>drawing it off-screen or something? > >Well, if you could keep the app hidden in the background, would that be >sufficient? Other than that, though, I have no thought offhand about how >it could be done. In fact, as it happens, MacPerl does stay in the foreground, so the unwanted GC window pops up behind the MacWindow depending of course on where the two windows are positioned. Its not too bad, but it's not ideal. I'll try to persuade Thorsten Lemke to have another look at the AE/Convert situation. It's kind of ironic that Graphic Converter should be weak-ish in the AE-Convert department. > >I hope this is not too far OT > >I don't find discussions of Apple events to be offtopic for this list at >all. :) > >>but it would be very useful to be able >>to convert 'gif' and 'jpeg' files to 'pict' format, on the fly and >>behind the scenes, so that MacPerl can draw them in a MacWindow. The >>end use is Toolbox related even if the question isn't. > >Very nice idea. Over the weekend I'll put a 'tutorial' script (if that's not tooo grandiose a title) up on <http://www.afco.demon.co.uk> so that folk can play with it. Feedback would as always be most welcome. Look for ListOfPictures.plx; it'll be an experimental MacList displaying '.gif's in response to a double-click. Alan Fry
