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

Re: [MacPerl] Sending AppleEvents to Frontier



At 08.21 1998.05.04, Emmanuel. M. Decarie wrote:
>I know about the Chris tutorial on the subject, but I'm very new to Perl,
>MacPerl and AppleEvents, so Its a lot to master before I can really use
>AppleEvents from MacPerl. Here is the script that I use, but its very slow
>because MacPerl have to compile the AppleScript.
>
>#!Perl
>
>$script = <<EOS;
>                tell application "UserLand Frontierª"
>                                Do Script "clock.now()"
>                end tell
>EOS
>
>$frontierResult=MacPerl::DoAppleScript($script);
>print($frontierResult);

This is the only easy way aside from doing the stuff in macperlcat.  Well,
someone could package the stuff in macperlcat into a module and thereby
make it easier to use it.  But there would still have to be lots of AE-type
stuff to do, like (Finder.id, 'aevt', 'odoc', '----', alias("$trsh")).  But
if you know Frontier and this is comfortable for you, then a module to do
this would not be too difficult to use.


>BTW, I didn't find a way to send a string inside the Frontier verb as <Do
>Script "dialog.notify(\"Hello from Frontier\")">. I tried to escape it with
>backlash with no avail.

Not sure how to do that.   It might be that Frontier doesn't play nice with
MacPerl the way it does with AppleScript in that regard.  I dunno.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch