[futurebasic] Re: Sending AEs to self?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 1998 : Group Archive : Group : All Groups

From: Jamin <benjamen@...>
Date: Mon, 13 Apr 98 11:46:18 +1000
>
>Has anybody tried to send AppleEvents to "yourself"? (that is, the sending
>program and the receiving program will be the same.) IM:IAC says to use the
>kCurrentProcess constant when creating an AEdesc with your target info, but
>I couldn't find the value for kCurrentProcess. Does anybody have that value?
>

From the FB Constants:

_kCurrentProcess = 2

>
>Another question, along the same lines, for the AppleEvent gurus. Is this
>how you create an AEdesc for direct dispatching?:
>
>myErr = AECreateDesc (_typeProcessSerialNumber, _kCurrentProcess, len
>(kCurrentEvent), targetAddressDesc)
>


I don't think "len (kCurrentEvent)" is what you want.  I use the the 
constant created when a define the Desc record, eg:

DIM RECORD blah
DIM aVar
DIM END RECORD.blah

myErr = AECreateDesc (_typeProcessSerialNumber, _kCurrentProcess, _blah, 
targetAddressDesc)

Jamin