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

[MacPerl] Sending AppleEvents to Frontier



Hello,
I'm not very familiar with AppleEvents and I was wondering if there is a _simple_ way to send directly an AppleEvents to Frontier and get back the result in MacPerl.

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);

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.

Thanks

Cheers

-Emmanuel
 

-----------------------------------------------------------------------
Emmanuel M. Dcarie - <emm@cam.org> -<http://www.mygale.org/05/mandec/>
  *Frontier en franais ! Creuse encore !
   <http://www.scripting.com/frontier5/francais/> 

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