Path: utzoo!attcan!uunet!husc6!bbn!mit-eddie!killer!pollux!ti-csl!m2!holland From: holland@m2.csc.ti.com (Fred Hollander) Newsgroups: comp.sys.mac.programmer Subject: Re: Finding out What Application is Running Keywords: Desk Accessories, CurApName Message-ID: <66460@ti-csl.CSNET> Date: 28 Dec 88 16:15:33 GMT References: <9065@ut-emx.UUCP> Sender: news@ti-csl.CSNET Reply-To: holland@m2.UUCP (Fred Hollander) Organization: TI Computer Science Center, Dallas Lines: 20 In article <9065@ut-emx.UUCP> jdm@ut-emx.UUCP (Jim Meiss) 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! There's a procedure called GetAppParms (see IM II) that will return (among other things) the Finder info. You can check the creator for 'XCEL'. Fred Hollander Computer Science Center Texas Instruments, Inc. holland%ti-csl@csnet-rela The above statements are my own and not representative of Texas Instruments.