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

Re: [MacPerl] Apple Events Scripting



At 8:01 1/6/97, Matthias Ulrich Neeracher wrote:
>pudge@pobox.com (Chris Nandor) writes:
>>I've done my first foray into Apple Events and MacPerl with my MacPGP.pm
>>module (in beta), and I've been doing some thinking.  Are we going to be
>>seeing lots of modules for interfacing with specific programs?
>>Netscape.pm, Anarchie.pm?
>
>Well, maybe we will see them, but so far, I've hrdly ever had reason to fear an
>abundance of material :-)

I am going to try some others, like Netscape.  Hey, BTW, you can send
straight JavaScript to Netscape through MacPerl:

#!perl
use Mac::AppleEvents;
$x = "This is sent from MacPerl $]";
$url = "javascript:var x = '$x'";
$be = AEBuildAppleEvent('WWW!','OURL',typeApplSignature,'MOSS',0,0,'') or
die $^E;
AEPutParamDesc($be,'----',(AEBuild('TEXT(@)',$url)));
$rp = AESend($be, kAEWaitReply) or die $^E;



>I would suggest to put program modules at least in the Mac:: hierarchy, maybe
>even in a deeper hierarchy. How about
>
>use Mac::Application::MacPGP.pm ?

That's what I was thinking ... sounds good to me.


>>And then what about updates?  Since AppleEvents change from version to
>>version, do we have Netscape-3.pm and Netscape-4.pm?
>
>Either that, or a smart module which tunes itself to the version.

I thought about that, but some apps change so much, it might be difficult.
Like Netscape 1.0, 2.0, 3.0 and 4.0 are so incredibly different you might
as well just have a new module ... maybe not.  Just throwing things out
there.

#================================================================
perl -e 'srand();if(rand>.5){$i=0;foreach(@ARGV){@$i=split(//);$z
[$i]=0;foreach(@$i){$s[$i][$z[$i]]=$_;$z[$i]++;}$i++;}foreach(@s)
{foreach(@$_) {print}print" ";$_++}}else{print(join(" ", @ARGV))}
print"\n"' McClellan Clan Motto: Think On

Chris Nandor                                      pudge@pobox.com
PGP Key 0xB76E72AD                              http://pudge.net/