[comp.sys.mac.programmer] a message box for the finder?

tedj@hpcilzb.HP.COM (Ted Johnson) (01/07/89)

Do the Macintosh gurus out there think it would be possible to write a VBL
task that would monitor a command-line window and carry out finder-like
commands?  What I have in mind is something like HyperCard's message box.
You would be able to launch applications, delete files, etc. all without
moving the mouse.  (Use pretzel-m to bring up the "message box", or just
use "blind typing").

Before I start coding such a thing, I'd like to know if anyone sees any
fundamental flaws with it.

-Ted

leonardr@uxe.cso.uiuc.edu (01/08/89)

tedj@hpcilzb.HP.COM(Ted Johnson) writes in comp.sys.mac.programmer

>Do the Macintosh gurus out there think it would be possible to write a VBL
>task that would monitor a command-line window and carry out finder-like
>commands?  What I have in mind is something like HyperCard's message box.
>You would be able to launch applications, delete files, etc. all without
>moving the mouse.  (Use pretzel-m to bring up the "message box", or just
>use "blind typing").
>
>Before I start coding such a thing, I'd like to know if anyone sees any
>fundamental flaws with it.
>
	Other than the lack of 'Mac-ness' to it, I see one major flaw - YOU CAN'T
DO THIS FROM A VBL!  The problem is that a VBL task is NOT permitted to do
any action which will move memory (and I am sure that your 'thing' will.
A much better method would be a GNE/WNE patch...


+---------------------------------+-----------------------------------+
+                                 +  Any thing I say may be taken as  +
+   Leonard Rosenthol             +  fact, then again you might decide+
+   President, LazerWare, inc.    +  that it really isn't, so you     +
+                                 +  never know, do you??             +
+   leonardr@uxe.cso.uiuc.edu     +                                   +
+   GEnie:  MACgician             +  MacNET: MACgician                +
+   Delphi: MACgician             +  AppleLink: D0025                 +
+                                 +                                   +
+---------------------------------+-----------------------------------+

tim@hoptoad.uucp (Tim Maroney) (01/08/89)

In article <730078@hpcilzb.HP.COM> tedj@hpcilzb.HP.COM (Ted Johnson) writes:
>Do the Macintosh gurus out there think it would be possible to write a VBL
>task that would monitor a command-line window and carry out finder-like
>commands?  What I have in mind is something like HyperCard's message box.
>You would be able to launch applications, delete files, etc. all without
>moving the mouse.  (Use pretzel-m to bring up the "message box", or just
>use "blind typing").
>
>Before I start coding such a thing, I'd like to know if anyone sees any
>fundamental flaws with it.

The basic concept is sound, but what's this about a VBL task?  The obvious
(and easiest) way to do such a thing is as a desk accessory.

Also note that unless it's scriptable and extensible, there's not much point.
-- 
Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim
"The Diabolonian position is new to the London playgoer of today, but not to
 lovers of serious literature.  From Prometheus to the Wagnerian Siegfried,
 some enemy of the gods, unterrified champion of those oppressed by them, has
 always towered among the heroes of the loftiest poetry."
    - Shaw, "On Diabolonian Ethics"

bob@accuvax.nwu.edu (Bob Hablutzel) (01/09/89)

> >Do the Macintosh gurus out there think it would be possible to write a VBL
> >task that would monitor a command-line window and carry out finder-like
> >commands?  What I have in mind is something like HyperCard's message box.
> >You would be able to launch applications, delete files, etc. all without
> >moving the mouse.  (Use pretzel-m to bring up the "message box", or just
> >use "blind typing").
> >
> >Before I start coding such a thing, I'd like to know if anyone sees any
> >fundamental flaws with it.
> >

> Other than the lack of 'Mac-ness' to it, I see one major flaw - YOU CAN'T
> DO THIS FROM A VBL!  The problem is that a VBL task is NOT permitted to do
> any action which will move memory (and I am sure that your 'thing' will.
> A much better method would be a GNE/WNE patch...

I hate to disagree, but I have to... *patching* GNE/WNE would not be a good
idea, because it would either have to duplicate a lot of GNE/WNE code, or
be a tail patch. (We wouldn't want to mess with MultiFinder, now, would we? :-)
Better would be to use jGNEFilter (or whatever the hell it's called), but 
even this is now frowned upon by Apple. I agree with a previous poster - 
make this a DA. Or, maybe even a small Application.

I do agree, however, that this should _not_ be a VBL task.

Bob Hablutzel	BOB@NUACC.ACNS.NWU.EDU
Disclaimer:	I know you didn't ask for my opinion. I don't care.

sho@pur-phy (Sho Kuwamoto) (01/10/89)

In article <730078@hpcilzb.HP.COM> tedj@hpcilzb.HP.COM (Ted Johnson) writes:
<Do the Macintosh gurus out there think it would be possible to write a VBL
<task that would monitor a command-line window and carry out finder-like
<commands?  What I have in mind is something like HyperCard's message box.
<You would be able to launch applications, delete files, etc. all without
<moving the mouse.  (Use pretzel-m to bring up the "message box", or just
<use "blind typing").
<
<Before I start coding such a thing, I'd like to know if anyone sees any
<fundamental flaws with it.

I think blind typing would be a bad idea.  Come to think of it, I'm not
sure how technically feasible it is to begin with, but even if you could
do it, it would make the interface modal with no reliable visual feedback.
Suppose the user has hilighted a filename which has scrolled off the
window.  Any typing will cause a renaming of the file in question.  Just
how would you check to see if the Finder wanted the keystroke in the first
place?

-Sho

ts@cup.portal.com (Tim W Smith) (01/10/89)

Yes, a VBL is out for this sort of thing.  A DA would be better, as Tim
Maroney suggests.  The only problem with this is you don't get to just
type pretzel-m or some other simple keystrokes to get it.

How about a function key?

							Tim Smith

tim@hoptoad.uucp (Tim Maroney) (01/11/89)

In article <13370@cup.portal.com> ts@cup.portal.com (Tim W Smith) writes:
>Yes, a VBL is out for this sort of thing.  A DA would be better, as Tim
>Maroney suggests.  The only problem with this is you don't get to just
>type pretzel-m or some other simple keystrokes to get it.
>
>How about a function key?

FKEYs are a pain to install for most people, but there's certainly
nothing wrong with having an FKEY that does an OpenDeskAcc for those
who want it.

However, you can put a menu shortcut key into a DA.  Just put the magic
menu manager metacharacters into the DA resource name.  Then when the
application does an AddResMenu, the shortcut will appear normally in
the apple menu.  As long as it doesn't conflict with an application
shortcut, it will work just fine.  (Disclaimer: I haven't actually
done this.)
-- 
Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim
"If you vote for clowns, you have no right to complain that only clowns
 make it to the ballot." -- Tim Maroney

brecher@well.UUCP (Steve Brecher) (01/12/89)

In article <6229@hoptoad.uucp>, tim@hoptoad.UUCP (Tim Maroney) writes:
> However, you can put a menu shortcut key into a DA.  Just put the magic
> menu manager metacharacters into the DA resource name.  Then when the
> application does an AddResMenu, the shortcut will appear normally in
> the apple menu.

This won't work, because AddResMenu does not interpret metacharacters
(AppendMenu does).
-- 

brecher@well.UUCP (Steve Brecher)

cyosta@taux02.UUCP ( Yossie Silverman ) (01/16/89)

In article <6229@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes:
.
.However, you can put a menu shortcut key into a DA.  Just put the magic
.menu manager metacharacters into the DA resource name.  Then when the
.application does an AddResMenu, the shortcut will appear normally in
.the apple menu.  As long as it doesn't conflict with an application
.shortcut, it will work just fine.  (Disclaimer: I haven't actually
.done this.)
.

I should think this wouldn't work.  When a DA is selected, the application
usually does a GetMenuItem to get its name.  Since AddResMenu already
stripped off the /<char> from the name, the name will not match any DRVR
which is available, certainly not the correct one.  The only way I know to
do what you want to do is use Quickeys, Tempo, or, MacroMaker.


-- 
Yossie Silverman                                   What did the Caspian sea?
National Semiconductor Ltd. (Israel)				- Saki
UUCP: taux01!yossie@nsc.UUCP
NSA LSD FBI KGB PCP CIA MOSAD NUCLEAR MI5 SPY ASSASSINATE SDI -- OOCLAY ITAY