Replace AEAddressDesc in apple event

199 views Asked by At

I have an apple event, and I need to resend this event to the other process. Can anyone tell me how?

static void GetEvent(AppleEvent *event)
{
    RgnHandle       cursorRgn = NULL;
    Boolean         gotEvent;

    gotEvent = WaitNextEvent(everyEvent, event, 32767L, cursorRgn);

    if (gotEvent)
       // AEProcessAppleEvent(event);
}

int main(int argc, char *argv[])
{
    ProcessSerialNumber psn;
    AppleEvent event;

    GetEvent(&event);
    GetProcessForPID([childProcess processIdentifier], &psn);
}

Thanks.

1

There are 1 answers

14
Peter Hosey On

AEAddressDesc is a type, so your question as stated doesn't make sense.

What you're really asking to do is set the address of an event. That's an attribute; namely, the keyAddressAttr attribute. Set it as you would any other attribute of an Apple Event descriptor.