Re: List Running apps and windows

2008-05-05 Thread Jere Gmail
Well, finally solved. No need for AXIsProcessTrusted. The problem is that the data stored in the NSArray was comming from an CFArray and was not printed with NSLog. But it was there. I want to use the info to do something like witch. Thanks a lot for your tips. I'll post some code latter if someone

Re: List Running apps and windows

2008-05-04 Thread Adam Leonard
On May 4, 2008, at 2:28 AM, Jere Gmail wrote: I have implemented this code: if(!AXAPIEnabled ()) { NSLog(@"API not enabled"); return; } if(!AXIsProcessTrusted ()) { NSLog(@"PROCESS not trusted"); } An

Re: List Running apps and windows

2008-05-04 Thread Chris Hanson
On May 3, 2008, at 3:52 PM, Jere Gmail wrote: I want to list all the running apps and their windows. Why, what do you hope to do with this information? The answer to that will probably help us help you much better. -- Chris ___ Cocoa-dev maili

Re: List Running apps and windows

2008-05-04 Thread Jean-Daniel Dupas
You need 10.4 support ? The SonOfGrab sample is able to list all windows without AXAPI ! Le 4 mai 08 à 11:33, Jere Gmail a écrit : PD: I have tried the UIElementInspector code and it also says that the App is not trusted, but it succeeds in geting other apps info. Instead when I run AXUIEle

Re: List Running apps and windows

2008-05-04 Thread Jere Gmail
PD: I have tried the UIElementInspector code and it also says that the App is not trusted, but it succeeds in geting other apps info. Instead when I run AXUIElementRef ref=AXUIElementCreateApplication(pid); AXUIElementCopyAttributeNames(ref, (CFArrayRef *)&theNames); theNames is empty. Why is this

Re: List Running apps and windows

2008-05-04 Thread Jere Gmail
I have implemented this code: if(!AXAPIEnabled ()) { NSLog(@"API not enabled"); return; } if(!AXIsProcessTrusted ()) { NSLog(@"PROCESS not trusted"); } And it enters the second if, so my app is not trust

Re: List Running apps and windows

2008-05-03 Thread Jean-Daniel Dupas
Le 4 mai 08 à 01:09, Steve Christensen a écrit : On May 3, 2008, at 3:52 PM, Jere Gmail wrote: I want to list all the running apps and their windows. Running apps is easy with [ws launchedApplications] but I cant find a way for listing their windows. I have tried NSWindowList(win_count,arr_wi

Re: List Running apps and windows

2008-05-03 Thread Steve Christensen
On May 3, 2008, at 3:52 PM, Jere Gmail wrote: I want to list all the running apps and their windows. Running apps is easy with [ws launchedApplications] but I cant find a way for listing their windows. I have tried NSWindowList(win_count,arr_win) but then [[NSApplication sharedApplication] wind

List Running apps and windows

2008-05-03 Thread Jere Gmail
I want to list all the running apps and their windows. Running apps is easy with [ws launchedApplications] but I cant find a way for listing their windows. I have tried NSWindowList(win_count,arr_win) but then [[NSApplication sharedApplication] windowWithWindowNumber:arr_win[i]] in a bucle will gi