home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!spool.mu.edu!darwin.sura.net!wupost!csus.edu!netcom.com!leonardr
- From: leonardr@netcom.com (Leonard Rosenthol)
- Subject: Re: Patching the _Launch Trap
- Message-ID: <gvrn-n#.leonardr@netcom.com>
- Date: Tue, 08 Sep 92 17:09:43 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- References: <1992Sep8.024049.20121@Arco.COM> <1992Sep8.145100.26889@Arco.COM>
- Lines: 35
-
- In article <1992Sep8.145100.26889@Arco.COM> John Champion <dedjhc@arco.com> writes:
- >In article <abrn6k+.leonardr@netcom.com> Leonard Rosenthol,
- >leonardr@netcom.com writes:
- >>
- >> If you could post what you are trying to accomplish by patching _Launch
- >>someone could probably suggest an alternate approach that would be
- >successful.
- >
- >I need FSSpec type information on applications and associated documents
- >that are launched, particularly by the finder. Unfortunately, not all
- >applications accept apple events so I can't just check for those.
- >
- Well, finding applications are easy, but getting documents may be a
- bit difficult since they are not "launched".
-
- One way that might work, assuming that you only care about System 7
- would be to intercept 'osel' events in the Finder. When the Finder "opens"
- anything, file, folder, disk, etc. it will send itself an 'osel' event - also
- many launching utils will also send the same event to the Finder in order to
- have things opened.
-
- There are two ways to intercept Apple events. The hard way is to patch
- _Pack8 (Apple Event manager), the easy (but undocumented way) is to install
- something called a PHAQHandler. A PHAQHandler is the equivalent of a head
- patch on an Apple event handler, so you could just grab the data for the event
- and then pass it along. You might also be able to do the same thing by
- getting the address of the current 'osel' handler, installing your own and
- then calling the original...
-
- --
- -----------------------------------------------------------------------------
- Leonard Rosenthol Internet: leonardr@netcom.com
- Director of Advanced Technology AppleLink: MACgician
- Aladdin Systems, Inc. GEnie: MACgician
-
-