On 17 May 2016, at 10:34, Dave <d...@looktowindward.com> wrote: >> On 16 May 2016, at 22:17, Jerry Krinock <je...@ieee.org> wrote: >> >> Dave, I’ve tried to do stuff similar to this with NSWorkspace, and found it >> to be often frustrating. According to your initial post, you’ve already >> tried pretty hard. If lengthening the time delay still does not work good >> enough for you, then, >> >> • If the apps that you want to cycle through are *your* apps, make them talk >> to one another using some proper interapplication communication. >> >> • If the apps that you want to cycle through are *others’* apps, then I >> agree with Ken that you should reconsider if you really “need” to do this. > > They are not my Apps, and I have and I do! I’d have never opened this can of > worms if I didn’t have to! > > I’m really surprised that there doesn’t seem to be a “Application Ready” type > notification. It struck me that this is a similar problem to AppleScript: > > tell application “X” > activate > end tell > > I remember quite a while back that I had problems if I tried to send events > to the Application too soon after the activate statement, this was usually > fixed by adding a delay. These days it the above statements seem to work and > I’m wondering if some code has been added to stop this from happening, and, > if so if I could do something similar.
Have you looked into NSWorkspace's NSRunningApplications yet? I think it lets you check which one is active. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://stacksmith.org _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com