Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Way to find out if application is hidden



Thanks for the help on this, I appreciate it.

Greg Guerin wrote:
In any case, you can write JNI code to call NMInstall as appropriate.

As you may have been able to guess, I'm trying to avoid learning how to do native code. :)


If I were using such an app, I may want the notification if the app is
inactive (i.e. not front-most), regardless of whether the app is hidden or

You have a good point here. I think I'll go ahead with my current plan and see if users request that for a later extension (or if, using it personally, I find it would be useful).


tell app "System Events" to get visible of process "Console"

This is very helpful as I didn't quite manage to find that code before. I think in the end I'm going to go with this approach - I've realised that even if I'm concerned about frequently spawning osascript processes ('unnecessarily' i.e. when the app isn't hidden), I could always cache the result for a second or two. Or I could use the active-window status as a filter before running this check.


Thanks!

--sam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Way to find out if application is hidden (From: Greg Guerin <email@hidden>)



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.