Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!ssc-vax!cxsea!blm From: blm@cxsea.UUCP (Brian Matthews) Newsgroups: comp.sys.mac.programmer Subject: Re: Finding out What Application is Running Message-ID: <2589@cxsea.UUCP> Date: 29 Dec 88 20:20:41 GMT References: <9065@ut-emx.UUCP> Reply-To: blm@cxsea.UUCP (Brian Matthews) Organization: Computer X Inc. Lines: 21 Jim Meiss (jdm@ut-emx.UUCP) writes: | In my desk accessory, I need to tell whether I've been opened |under Excel, because Excel always keeps its edit window as the |frontmost window. | Currently I just check CurApName to see if it includes the |string "Excel". Of course that only works if someone hasn't renamed |Excel to something else (perverse person!). | Anyway, does anyone have a better idea? I always get nervous |using a low memory global! Instead of looking for a particular nasty application, why not look for the particular behaviour instead? This way you'll work with any application that behaves that way, regardless of the name. In this case, perhaps you could just call FrontWindow, and see if it's yours. Just a suggestion... -- Brian L. Matthews blm@cxsea.UUCP ...{mnetor,uw-beaver!ssc-vax}!cxsea!blm +1 206 251 6811 Computer X Inc. - a division of Motorola New Enterprises