[comp.sys.mac] How to Foul DA Handler

pgn@osupyr.mast.ohio-state.edu (Paul G. Nevai) (11/22/88)

     HELP!!!      HELP!!!      HELP!!!

In MultiFinder with plenty of unfragmented RAM available I still
 frequently cannot open DAs because the DAHandler tells me that 
there isn't enough memory and suggests to quit other applications etc.

I got sick of this and so I am designing my own DA Handler program
 (in LSP). The only problem is that when I say OpenDeskAcc then the 
DA gets automatically loaded into the DA Handler and that's precisely
what I want to avoid. Of course, I can hold down the Option Key and then
everything works OK. But I'd like to automate the process so I would 
not have to press the Option Key while loading my favorite DAs. 

Thus I have the question:

How can I foul the Mac into thinking that the Option Key is down? Can I
modify the event queue or what? Anyone has hint or an example in Pascal? 

Please Email answer! 10^6 thanks!

Paul Nevai                                pgn@osupyr.mast.ohio-state.edu 
Department of Mathematics                 TS1171@OHSTVMA.bitnet
The Ohio State University                 73057,172.Compu$erve
231 West Eighteenth Avenue                1-614-292-5310.office
Columbus, OH 43210, U.S.A.                1-614-292-4975.dept

jwhitnell@cup.portal.com (Jerry D Whitnell) (11/24/88)

pgn@osupyr.mast.ohio-state.edu (Paul G. Nevai)  writes...

|In MultiFinder with plenty of unfragmented RAM available I still
|frequently cannot open DAs because the DAHandler tells me that
|there isn't enough memory and suggests to quit other applications etc.

I got tired of this behavior too.  I also hated having the DAs show up in
a different layer then the application (I HATE WINDOW LAYERS!!!).  So I
took a different route then the one you took and patched MultiFinder to
reverse the sense of the option key.  For my MF, not holding the option
key loads the da into the application, while holding the option key loads
the da into the DAHandler.  A few DAs  don't like this, but most do (Acta
V2.0 is the worst culprit).  The patch is as follows:

    MultiFinder Patch for Option Key

    Look for two occurances of

        0200 0004 57c0 4400    and change to:
        0200 0004 56c0 4400    

Usual caveats about doing this on a backup copy of MultiFinder.  The patch
works with 5.0, 6.0 and 6.0.2, although the code is in different places in
each.

--
Jerry Whitnell                    Several Species of Small Furry
jwhitnell@cup.portal.com          Animals Gathered Together in a
..!sun!cup.portal.com!jwhitnell   Cave and Grooving with a PICT.

chiaravi@silver.bacs.indiana.edu (Lucius Chiaraviglio) (11/25/88)

In article <11690@cup.portal.com> jwhitnell@cup.portal.com (Jerry D Whitnell)
writes:
[About patching MultiFinder to reverse the sense of the Option key for DA's]
|                             [. . .]  For my MF, not holding the option
|key loads the da into the application, while holding the option key loads
|the da into the DAHandler.  [. . .]

	Does this reverse the sense of the Option key ONLY for activating
DA's, or does it also reverse the sense of the Option key for other Finder
menu items, dragging, etc.?  If the former, I am interested.

|    MultiFinder Patch for Option Key
|
|    Look for two occurances of
|
|        0200 0004 57c0 4400    and change to:
|        0200 0004 56c0 4400    

	Where in MultiFinder do I look for these -- anywhere they occur, or in
a particular part?

-- 
|  Lucius Chiaraviglio   |  ARPA:  chiaravi@silver.bacs.indiana.edu
BITNET:  chiaravi@IUBACS.BITNET (IUBACS hoses From: fields; INCLUDE RET ADDR)
ARPA-gatewayed BITNET:      chiaravi%IUBACS.BITNET@vm.cc.purdue.edu
Alt ARPA-gatewayed BITNET:  chiaravi%IUBACS.BITNET@cunyvm.cuny.edu

jwhitnell@cup.portal.com (Jerry D Whitnell) (11/26/88)

Lucius Chiaraviglio writes...
In article <11690@cup.portal.com> I write:
>|[About patching MultiFinder to reverse the sense of the Option key for DA's]
>
>	Does this reverse the sense of the Option key ONLY for activating
>DA's, or does it also reverse the sense of the Option key for other Finder
>menu items, dragging, etc.?  If the former, I am interested.

It only modifies MultiFinder.  Finder, Suitcase II and all others
that use the option key use it as they normally do.

>|    MultiFinder Patch for Option Key
>|
>|    Look for two occurances of
>|
>|        0200 0004 57c0 4400    and change to:
>|        0200 0004 56c0 4400 
>
>	Where in MultiFinder do I look for these -- anywhere they occur, or in
>a particular part?

Everywhere they occur in the resource fork of MultiFinder.  But there
should be only two occurances.  For System 6.02, they occur at offsets
4961 (hex) and 8b5f (hex).  For other versions they occur in other places.
Again, be sure to make a backup copy before you modify it!  Also, I havn't
tested it with the new version of MultiFinder that comes with MPW 3.0B1.

--
Jerry Whitnell
jwhitnell@cup.portal.com
..!sun!cup.portal.com!jwhitnell