[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Running filters in BBEdit



At 15.50 +0000 2000.03.29, Bart Lateur wrote:
>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?    ;-)

Well, it can with MacPerl::DoAppleScript() or Mac::Glue.  All OSAX (that
you have created glues for) are available to all application glue objects,
jus' like in AppleScript.

  use Mac::Glue;
  $bb = new Mac::Glue 'BBEdit';
  $bb->activate;
  $return = $bb->display_dialog("Hello World", buttons => ["Hi"]);
  print $return->{button_returned};

-- 
Chris Nandor       |     pudge@pobox.com      |     http://pudge.net/
Andover.Net        | chris.nandor@andover.net | http://slashcode.com/

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org