#AShell and Conman
7 messages in this thread
Bill, I've gotta question for you! 🙂
I'm testing out the AShell from ARP v1.3 with Conman 1.3, and opened a new
shell with the command:
ashell "con:/1/300/100/test/c"
It opened the Ashell with the close gadget, as I had wanted, but the close
gadget is only partly functional. Clicking on it -seems- to close the console,
but doesn't close the CLI window. I have to type ENDCLI within the AShell to
close it out.
Any other typing gets ignored, just as I would expect if the console were
closed.
Do you have any idea how to get the close gadget fully functional? I would
appreciate it!!
I don't know whether the ARP shell supports the use of the close gadget on
console windows or not … the documented action of the close gadget is to
turn the console into a NIL:-type device, so that it returns only EOF's
when you read from it. Since a console normally doesn't send back an EOF,
it's easy for the shell to detect that something special is happening, and
it can then choose to close the window.
The approach I use in WShell is to count the number of consecutive EOF's
received and close when the count hits 5. This avoids accidental closing
from entering a CTRL-\ (which is documented as the "EOF" character). For
further safety I modify the prompt string to say "Ending nn …" for the
last three EOF's.
It's actually rather nice being able to close the window with either a
close gadget or CTRL-\s; if I don't feel like reaching for the mouse I can
just hit a bunch of CTRL-\s.
Yep, this is the kind of thing that makes me glad I have WShell!
Hmm, it occurs to me that I didn't explain that my friend was trying to get
it to work on his home Amiga, so we tried it here on my work Amiga. When it
didn't work I sent you that message.
I'm trying to talk my friend into buying WShell, but he wants to check out
the PD or freely re-distributable shells first.
I think I've used the Crtl \\\\\ in Wshell to close a window, maybe twice
in the last couple of years. In the first month of having the A1000 3 years
ago, I copied Endcli to ram: and renamed it \\ (the backlash key is as
close to the RETURN key as you can get). to the C directory. Now having the
ability to make some programs resident like \\, the window disappears as
fast as it takes to hit the keys. As for being able to use the mouse to hit
the close gadget provided thru Wshell, it's a good feature.
There is one other reason to occasionally use the CTRL-\\\\\ trick to close
the shell, instead of the close gadget. When you hit the close gadget, the
console goes into its "I'm NIL: and trying to close" mood, and to encourage
all openers to close their filehandles, it issues control-C breaks to
anyone who continues writing to the window. This usually works well, but
if for example you want the program currently running to exit normally,
it's best not to hit the close gadget. CTRL-\\\\\ gets queued up like
normal typeahead input and so takes effect after the program exits.
Of course your renamed ENDCLI command would work fine in this case as well.
One possibility… if you have RUN something from that shell, the program
you ran will have a lock on the console, in the same way that a CLI will
not end with the ENDCLI command if you have RUN something from it. Try
opening a console in the same way, and without running anything else, try
closing it with the CLOSE gadget. Ignore this if you've already tried
this.
Kevin – sorry, ASH doesn't currently recognize CONMAN's close gadget
handling … that's something I'd like to see as well, so I'll bug Scott to
work on it before the next ASH release. Currently ASH expects to see the
input filehandle set the same way the "ENDCLI" program sets it, which is
slightly different from the way the close gadget sets the stream.
…cheath