Re: Window Opened Notification?

2016-09-08 Thread dave
I think I’ve worked out how to do it without making it so buggy but it will take a lot of experimentation…... > On 7 Sep 2016, at 10:41, dangerwillrobinsondan...@gmail.com wrote: > > >> On Sep 7, 2016, at 6:09 PM, Dave wrote: >> >> I’m already using Accessibility but

Re: Window Opened Notification?

2016-09-08 Thread dave
> On 6 Sep 2016, at 01:29, Andy Lee wrote: > > Dave, can you clarify whether you want is: > > 1. a notification when the frontmost window changes, or > 2. a notification when some application opens a new window? > > If #1, observing these NSWorkspace properties looks like the

Re: Window Opened Notification?

2016-09-07 Thread dangerwillrobinsondanger
> On Sep 7, 2016, at 6:09 PM, Dave wrote: > > I’m already using Accessibility but the notification I get when a window is > created is posted to too late for it to help in this case. > > I’m also using Event Taps, I want to be able to stop events being fired to > the

Re: Window Opened Notification?

2016-09-07 Thread Dave
Hi, I’m already using Accessibility but the notification I get when a window is created is posted to too late for it to help in this case. I’m also using Event Taps, I want to be able to stop events being fired to the window until I have received and procesed the Window Created Accessibility

Re: Window Opened Notification?

2016-09-06 Thread じょいすじょん
> On 2016 Sep 6, at 18:49, Dave wrote: > >> >> Ah. >> Well in that case, you get accessibility and you need users to allow it >> once. > > I said in my original post - without using Accessibility > > Cheers > Dave I know. I remember. Point is, the AX API is your

Re: Window Opened Notification?

2016-09-06 Thread Dave
> On 6 Sep 2016, at 10:37, dangerwillrobinsondan...@gmail.com wrote: > > Ah. > Well in that case, you get accessibility and you need users to allow it once. I said in my original post - without using Accessibility Cheers Dave >> On Sep 6, 2016, at 5:49 PM, Dave

Re: Window Opened Notification?

2016-09-06 Thread dangerwillrobinsondanger
Ah. Well in that case, you get accessibility and you need users to allow it once. Sent from my iPhone > On Sep 6, 2016, at 5:49 PM, Dave wrote: > > Hi, > >>> The two key properties in NSWorkspace > > I saw these properties but I don’t think they will do what I

Re: Window Opened Notification?

2016-09-06 Thread Dave
Hi, >> The two key properties in NSWorkspace I saw these properties but I don’t think they will do what I want since frontmostApplication and menuBarOwningApplication refer to an Application not a Window within an Application. For instance: Launch Text Edit Empty Window Opens

Re: Window Opened Notification?

2016-09-05 Thread Andy Lee
Dave, can you clarify whether you want is: 1. a notification when the frontmost window changes, or 2. a notification when some application opens a new window? If #1, observing these NSWorkspace properties looks like the way to go. If #2, bear in mind that applications can open windows that

Re: Window Opened Notification?

2016-09-05 Thread dangerwillrobinsondanger
The two key properties in NSWorkspace ARE KVO observable. Reading the docs was easy ;) frontmostApplication And menuBarOwningApplication Sent from my iPhone > On Sep 6, 2016, at 8:36 AM, Alex Zavatone wrote: > > There are examples online for making NSArray observable if these

Re: Window Opened Notification?

2016-09-05 Thread Alex Zavatone
There are examples online for making NSArray observable if these are array structures. If you try this path, try it with a simple case where you make an NSArray and then change it. Sent from my iPhone > On Sep 5, 2016, at 4:25 PM, dangerwillrobinsondan...@gmail.com wrote: > > Not sure if

Re: Window Opened Notification?

2016-09-05 Thread dangerwillrobinsondanger
Not sure if it's KVO observable but NSWorkspace might be worth looking into as well as NSRunningApplication Sent from my iPhone On Sep 6, 2016, at 3:55 AM, Dave wrote: >> Would it be possible to observe which window becomes the front window and >> then send a

Re: Window Opened Notification?

2016-09-05 Thread Dave
> Would it be possible to observe which window becomes the front window and > then send a notification? > That’s what I am trying to find out…… Cheers Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Window Opened Notification?

2016-09-05 Thread Dave
> On 5 Sep 2016, at 18:27, dangerwillrobinsondan...@gmail.com wrote: > > Not really. > You could use CGWindowList but you'll be polling. I was wondering if it would be possible to make the Window list Key-Value observable? I’m Trying to avoid running a timer and polling the Window list.

Window Opened Notification?

2016-09-05 Thread Dave
Hi All, Is there any way other that using Accessibility that you can tell when a window is opened is any application? Something like a running app notification? If it is not possible using Cocoa? Is there any way of doing this via the Window Server? All the Best Dave