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

Re: [MacPerl-Toolbox] Apple events and PSN ... bug?



In article <v04020a1db34cf4499b41@[192.168.0.77]>, Chris Nandor <pudge@pobox.com> writes:

> This seems to me it should work.  I confirm that the PSN I get from
> Mac::Processes (in this case, 8208) is indeed the decimal number
> corresponding to the hex PSN that an app called Process Watcher tells me is
> assigned to BBEdit (2010).  So I seem to have the right number.  But the
> script produces:

> $evt = AEBuildAppleEvent(qw(aevt quit), typeProcessSerialNumber, $psn,
>     kAutoGenerateReturnID, kAnyTransactionID, '') or warn $^E;

If I remember correctly, I take no precautions to transform a numerical
psn you pass into binary form. Try pack()ing the PSN to a 64 bit number first.

Matthias

-- 
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "And that's why I am going to turn this world upside down, and make
   of it a fire so *bright* that someone real will notice"
                                -- Vernor Vinge, _Tatja Grimm's World_

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