On Tue, 28 Mar 2000 22:30:55 +0200, Peder Axensten wrote: >The combination of MacPerl and BBEdit is great! I've a collection of >AppleScripts, mainly text filters, for BBEdit that I'm redoing in >MacPerl for better functionality and speed. Everything works great >except for dialogs: > >if(MacPerl::Answer("Should I insert Russian hyphenation?", "Yes", >"No!")) { whatever } > >This will put up a non-modal dialog in MacPerl, but since I'm in >BBEdit I can't see it. I don't use BBEdit + filters myself, and I'm not too experienced with MacPerl + AppleEvents either... but I'm pretty sure the following approach ought to work. You have to put in the MacPerl equivalent of the AppleScript: tell application "MacPerl" to activate just before you show the dialog. I'm sure Chris will quickly turn this into a neat AppleScript-free code snippet in no time... ;-) Maybe you'll have to put in code to set the focus back to BBEdit afterwards. Applescript's dialogs have an advantage over this: you can tell other applications to show a dialog. So: tell application "BBEdit" display dialog "Hello, world" buttons "Hi" end tell will appear with BBEdit in focus. Nice. But I think Applescript uses a standard OSAX (AppleScript addition) for it, so you can't really use it with MacPerl. Any chance of MacPerl acquiring this functionality? ;-) -- Bart. # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org