On 3/28/00 at 10:30 PM, f95-pax@nada.kth.se (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. Clicking *repeatedly* on the MacPerl icon in > the Finder's task manager palette will eventually make it surface -- > then I can click a button in my dialog and get on. > > This is annoying and new users even think BBEdit hung. > > So, any suggestions on how to do simple user input in BBEdit MacPerl > filters? This seems to work as a MacPerl filter: #!perl -w use Mac::Processes; use Mac::Events; $bbedit = GetFrontProcess; $macperl = GetCurrentProcess; SetFrontProcess $macperl; WaitNextEvent; if(MacPerl::Answer("Should I insert Russian hyphenation?", "Yes", "No!")) {print "hyphenation";} else {print "No hyphenation";} SetFrontProcess $bbedit; WaitNextEvent; > BTW, I do wish there was a MacPerl filters menu, the palette is > clumsy... Send a request for this feature to Bare Bones Software. Brad # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org