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

Re: [MacPerl] Ping.pm project



At 11.51 7/21/97, Paul J. Schinder wrote:
>I recently saw on one of the AppleScript lists that there's something out
>there that's Applescriptable and does ICMP echo, but I've forgotten exactly
>what.  (Is it WhatRoute?  I don't have that installed on my Powerbook, so I
>can't look for an aete right now.)  Track it down, and I'm sure Chris will
>show us how to send the AppleEvent to it from MacPer.  We can then do an
>"if ($^O eq "MacOS")" in a copy of Net::Ping.

Tried with latest WhatRoute and it doesn't work properly.

#!perl
$\="\n";
use Mac::AppleEvents;
$be =   AEBuildAppleEvent('sWRT','ping',typeApplSignature,'TRCE',0,0,
                "'----':"204.32.80.8"") || die "$!\n";
$rp = AESend($be, kAEWaitReply) or die $^E;
print AEPrint($rp);
__END__

First, you can't get the results back, the only go to the WhatRoute window.
Second, no matter which action I give it: qury, ping, trce (Query, Ping,
Traceroute), it performs the action specified in the popup window.  So if
you ask it to ping, it might do a traceroute instead.

But FWIW, there it is.

--
Chris Nandor             pudge@pobox.com             http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])



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