TIP: Click on subject to list as thread! ANSI
echo: commo
to: JORJ STRUMOLO
from: CHUCK SEYBOLDT
date: 1995-07-15 09:56:00
subject: Confirm on exiting Commo

JR> Can some type of confirmation be added when exiting Commo?  For
  > example, press Alt-x and then be asked "really exit, Yes/No".
JS>  CS-Mac seems to have a pretty good system.
JS>  .... in CS-COMMO.CSM (which is in CSMAC13A.ZIP), starting
JS>  around line 1180.  As CS-Mac is shareware, I probably shouldn't
JS>  just copy in the section.
Jorj,
        I have no problem with folks copying small sections like
that.  What I ask is that they attribute the authorship to the
author.
        CS-MAC is free, BTW.   CS-PILOT is the only part that is
crippled.  CS-PILOT is designed to do continuous unattended
operation.  It might ask for a keypress after an event is done,
unless you have a key, then the chance of asking for keyboard
attention is removed.  CS-PILOT runs just fine without a key, it
just has that slight risk of demanding keyboard attention.  If you
are home every day, that cripple would be a very small bother.
        Anyway, that is a long wander from the Alt-X topic .  I
have posted this before, mainly to point out the unusual combination
of {wind}/{keys}/{menu}/{gets} commands.
        {wind-k} keeps menu/info windows on the screen
                 build the menu as usual except put a
        {keys 61} command to immediately choose menu selection A
                just before the
        {menu}  command  (in other words, it's not a menu anymore,
                merely a window sitting on the screen). Then, use
        {gets}  to get the user's response
        {wind}  to clear the screen and go on
        Lots of flexibility, you can have a {setg 1} like I do here
to have the window updated once a second, or you can {setg} so the
window demands attention from the keyboard.
        Another nifty (I daresay thoughtful) tip is putting a
parallel commentary on the status line with a bogus label name in
the {gets } command .... the example here is
{gets-hi key,1,%count Seconds to Exit}
        One HUGE/BIG/IMPORTANT caveat .... be sure to do a {wind} to
clear the window from the screen before concluding the macro.
 {:exit_}{setv xtime,5}           ;set the guard timer here
         {comp xtime} {ifco q_ask};xtim=NUL no timer, always ask
         {comp xtime,0} {ifco q_q};xtim=0   no menu, quit wo/asking
         {setv count,%xtime}      ;guard delay
         {wind-k}                 ;holds the menu screen in view
 {:xlop} {setv _menu1,  Exit ^(Commo^) in %count seconds}
         {setv _menu2,        "Y" to confirm}
         {setv _menu4,   "N" or SPACEBAR to deny}
         {setv _mlabel,x__2}      ;label to goto when 'A' is pressed
         {subs _mcolor,31,5,%palette}
         {keys 61}                ;press 'A' in advance
         {menu 8,33,CS-MAC%cs_ver};show the menu ....
 {:x__2} {setg 1,x__3}            ;a one second wait
         {gets-hi key,1,%count Seconds to Exit}
         {comp key,y} {ifco q_t,noex};'Y' branch
 {:x__3} {decr count}
         {comp count,0}           ;when counter reaches zero
         {ifco q_t,xlop}          ; goto q_t, else loop
 {:noex} {wind} {retu}       ;remove menu screens & stay
 {:q_t}  {info-d1s0 Normal Exit from Commo}     ;normal exit
 {:q_q}  {exit}
 {:q_ask}{info-q Are you sure you want to exit?}
         {ifco q_q,stop}
07/15/95   08:02                                        ChuckùS
-*-
 þ JABBER v1.3á1 #á021 þ {COMMO} a new standard in telecommunications.
--- Opus-CBCS 1.7x via O_QWKer 1.1
---------------
* Origin: BlinkLink - Perceiving is believing! 412-766-0732 (1:129/89.0)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.