| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I put together the code, but every time it runs, AXObserverAddNotification always returns the error kAXErrorCannotComplete. I've tried several modifications, but nothing changes. Is that most likely because of a code error my part, or is it because these calls are still in "draft" mode?
ProcessSerialNumber psn = UProcess::GetPSN( "\pmail");
pid_t pid = psn.lowLongOfPSN;
AXUIElementRef elementRef = ::AXUIElementCreateApplication (pid);
AXObserverRef observerRef;
AXError err = ::AXObserverCreate ( pid,
(*(AXObserverCallback)MyObserverCallback),
&observerRef);
err = ::AXObserverAddNotification ( observerRef,
elementRef,
kAXMainWindowChangedNotification,
nil );
// err always returns kAXErrorCannotComplete
| References: | |
| >Re: Need to find which window is active (From: Modesitt Software <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.