home *** CD-ROM | disk | FTP | other *** search
- : ZMENU.T ZCOMM Version 2 90-05-01
- : previous verions V1 V1A superseded
- :: modem assumed to support full Hayes set. Limited modem support.
- : Author: Bruce E. Högman, 629 S. 24th St., Arlington VA 22202-2525
- : Phone: (703) 685-4926 (home) (703) 644-5200x6470 (work)
- : FAX: (703) 685-0478 (home)
- : Users are encouraged to contact the author with suggestions.
- : See ZMENU.DOC
- ::
- ::=== Symbols used within zmenu.t
- ::
- :: Labels contained in zmenu.t
- ::
- :: setup initializes menu system. Called by ZCOMM at start,
- :: if phones set to zmenu.t
- :: setup processing also results in a zmnuparm.t
- :: script which is used for all future startups.
- :: to alter zmnuparm.ini, edit it, then del zmnuparm.t
- :: and call setup.
- ::
- :: bbs Direct entry into BBS menu (only after setup)
- :: boards Direct entry into BBS menu (only after setup)
- ::
- :: displayreset resets display to value in zmnuparm.ini,
- :: cancels keyboard customization using 'mk' cmd
- ::
- :: hangup puts modem into command mode and issues ATH
- ::
- :: inigrab grabs parameters from zmnuparm.ini file
- :: (like win.ini for windows, you know)
- ::
- :: offyam what do you want to do upon "off" command?
- ::
- :: online call online when you tromp on script or
- :: exit to command mode. this is easy return to
- :: term mode.
- ::
- :: your_name your system names to call. make a label for the
- :: system name, then: your_name goback rmtcall.
- :: ZCOMM nicely sets string 'remote' to your_name,
- :: and the 'rmtcall' script carries on from there.
- :: You will, however, also need an entry in zmnulgn.T
- ::
- :: zmenu*** sub-menu scripts
- ::
- :: Main entry point for "call zmenu"
- :: string phones is used by ZCOMM as where to go to find scripts
- :: Symbols used in ZCOMM version:
- ::
- :: YAM-type ZCOMM-type
- :: menumode fa12 str 1 ` \x60 on/off z0
- :: menuinit fa12 str 2 y/n z1
- :: menupage fa12 str 3 e/1/2/3/4... z2
- :: timezone fa12 str 4 EST/EDT/CST/CDT... z3
- ::
- :: menufone fa11 whole variable %lib/zmnufon%page
- ::
- :: modemspeed fa10 whole variable
- ::
- :: menutitle fa9 whole variable
- ::
- :: modeminit fa8 whole variable
- ::
- :: colordisplay fa7 str 1 ` y/n
- :: colornormal fa7 str 2 \E[0;33;1m yellow
- :: colorhigh fa7 str 3 \E[0;31;1m red
- ::
- :: menumsg fa6 whole variable
- :: emulate fa5 whole variable
- :: mndispl1 fa4 whole variable
- :: mndispl2 fa3 whole variable
- :: fa2
- :: termmode fa1 whole variable
- ::
- :: (script stuff)
- :: myfirstname fc11 whole variable
- :: mylastname fc12 whole variable
- :: mycity fc10 whole variable
- :: mystate fc9 whole variable
- :: mypassword fc8 whole variable (set by findq processing)
- :: rmtcript fc7 whole variable (set by findq processing)
- :: rmttitle fc6 whole variable (set by findq processing)
- :: myconnect fc5 whole
- :: TSOuserid fc4 whole
- :: TSOpasswd fc3 whole
- :: rmtmsg fc2 whole message text
- :: msglevel fc1 whole numeric range 0-5 0 is silent
- :: menuhname fs12 whole
- :: menuhscr fs11 whole
- ::
- ::=== zmenu entry point
- :: If you call zmenu, then I assume you want to use menu system.
- zmenu: set phones zmenu.t
- ::
- :: if menu system is not initialized, go do setup
- if !%fa12 goto setup
- ::
- :: display zmenu screen
- type zmenu.scr
- ::
- :: if user has defined a menu title line, display it, centered.
- set ifs "`";split fa7
- if %fa9 setn n1 79-%fa9/2
- if %fa9 lput "\E[s\E[1;%n1\&H%z1 %fa9 \E[u%z2"
- ::
- :: show the last command entered
- set ifs "`";split fa7
- if !%fa6 set fa6 "None"
- lput "\E[2A\E[17C\E[35;1mLAST: %fa6\&\E[u%z2"
- ::
- ::=== accept the one-character menu option that says what to do
- ::
- set ifs "`";split fa7
- set s0 "";acceptl1 s0 "\E[3A\E[13C%z1\&_\E[1D\E[s%z2"
- :: Here's a branch table to go places based on user keyed input:
- if is0,b goto zmnub
- if is0,c goto zmnuc
- if is0,d goto zmnud
- if is0,e goto zmnue
- if is0,g goto zmnug
- if is0,h goto zmnuh
- if is0,i cls;goto setup
- if is0,k goto zmnuk
- if is0,m goto zmnum
- if is0,o goto zmnuo
- if is0,p goto zmnup
- if is0,q goto zmnuq
- if is0,x goto zmnux
- if is0,s goto zmnus
- if is0,t goto zmnut
- set fa6 "not recognized"
- if afc1<4 goback zmenu
- lput "\E[10;1H\E[J\E[1B\E[80D\E[0;36;1mOption %s0 not recognized"
- lput "\E[1B\E[80DOn this panel, you are restricted to entering"
- lput "\E[1B\E[80Djust those letters listed with the menu options."
- lput "\E[1B\E[80DI will display help information now."
- set s1 "-any key to continue-";setn n1 79-%s1/2
- acceptl1 s0 "\E[1B\E[80D\E[%n1\&C%s1"
- set fs12 "";goto zmnuhm
- ::
- ::=== Setup is called by ZCOMM on entry or on first call to zmenu.t
- ::
- setup:
- :: If the script file exists, then use it for faster initialization
- if !fzmnuparm.t goto setupcold
- setuphot:
- sets s0 " source %drive:%home/zmnuparm.t";gosub execute
- userexit:
- if f%lib/zmnuuser.t source %lib/zmnuuser.t
- set fa6 "Menu system Initialized"
- :: menumode fa12 str 1 ` on/off z0
- :: menuinit fa12 str 2 y/n z1
- :: menupage fa12 str 3 e/1/2/3/4... z2
- :: timezone fa12 str 4 EST/EDT/CST/CDT... z3
- setc ifs "`";split fa12;set z1 y
- setc fa12 "%z0\&`\&%z1\&`\&%z2\&`\&%z3\&`"
- if iz0,off return
- goback zmenu
- ::
- :: displayreset is used to return to a known mode after doing
- :: strange things in remote logon scripts, maybe (for IBM with
- :: Renex, in particular) Among other things, it cancels keyboard
- :: mapping which may be used with strange protocol converters.
- displayreset:
- if %fa5 sets s0 "%fa5";gosub execute
- if %fa4 sets s0 "%fa4";gosub execute
- if %fa3 sets s0 "%fa3";gosub execute
- mk
- return
- :: This little routine simply waits for a number of intervals based
- :: on relative expertise as set in msglevel (fc1).
- :: This assumes that experts can read faster or don't need help at all.
- dwell:
- setn n2 fc1*8;setn n1 0
- dwellloop:
- setn n1 n1+8;if an1>n2 return
- sleep 8;goback dwellloop
- ::
- :: execute gosub supports use of temp file to issue commands
- :: on input: s0 has command to execute
- :: This corresponds to the Pro-YAM "obey" command
- execute:
- kill;ki;sets s1 "%dircx";sets dircx "%drive:%home";del zmnumain.tmp
- create zmnumain.tmp;echof " %s0";close;source zmnumain.tmp
- sets dircx "%s1";return
- :: This routine resets term mode to use-specified values
- termmode:
- sets s0 "%dircx";sets dircx "%drive:%home";del zmnumain.tmp
- create zmnumain.tmp;echof " ena %fa1";close;source zmnumain.tmp
- sets dircx "%s0";return
- ::
- :: This routine is meant to force a hangup. It usually works.
- hangup: bye;o;pat
- mk;dis -t;pat 0 "OK";sets s0 "speed %fa10";gosub execute
- put "+++\r";sleep 5;put "ATH\r"
- wait -f1
- if !0 goto hangup
- hangupx: put "\r";pat;gosub displayreset
- lput "\E[80D\E[K\E[1A\E[K\E[1A\E[K"
- if afc1>0 if !jfa6,HUNG sets fa6 "%fa6 HUNG UP"
- echo " MODEM HUNG UP ";if afc1>0 sleep 5
- set ifs "`";split fa12;if i%z0,off return
- if jfa6,BBS goto zmnub
- goback zmenu
- ::
- :: inigrab input: s0 set to string to find
- :: and zmnuparm.ini contains init values: keyword value value
- :: ZCOMM version of inigrab
- inigrab:
- :: zero the hit counter "?"
- p?0
- :: search for requested string
- findq %s0 zmnuparm.ini
- :: if found, set s0 to value found, else set s0 to null
- set s0 "";set ifs ""
- if ?>0;split z0 " " "";sets s0 "%z1"
- return
- ::
- :: the BBS label is available for direct "call bbs" use.
- :: -do- boards label
- bbs:
- boards:
- zmnub:
- :: If no user name yet, go get it.
- if !%fc12 gosub getmyname
- :: If no password set yet, go prompt for it.
- :: (Pro-YAM only): ZCOMM uses zmnubbpw.ini file
- :: Display the phones list for the user to select from
- :: menupage is set to default, fa12. menufone is in fa11
- goto zmnubsingl
- :: Handle multiple phone lists here.
- zmnubmulti:
- set ifs "`";split fa7
- lput "\E[2J\E[2;25H%z1\& Phone List Selection Menu %z2"
- if %fa9 setn n1 79-%fa9/2
- if %fa9 lput "\E[s\E[1;%n1\&H%z1 %fa9 \E[u%z2"
- sets s0 %lib/zmnufone.scr
- if !f%s0 goto zmnubm2
- set ifs "`";split fa7
- lput "\E[1B\E[80D\E[5C%z1\&e)%z2\E[5C\E[s"
- p?0;findq (title) %s0;if !? set z0 "unknown Untitled entry"
- sets s0 "%z0";set ifs " ";split s0 " " "";sets s1 "%z1"
- set ifs "`";split fa7
- lput "\E[u\E[35mzmnufone.scr\E[5C%z1\&%s1\&%z2"
- set n1 0;gosub zmnubmultin
- set ifs "`";split fa12
- acceptl1 s0 "\E[1B\E[80D\E[5C\E[33;1m\&_\E[31;1m Select\E[33;1m\E[8D"
- if is0,? goback zmnubmulti
- if is0,* goback zmnubmulti
- if fzmnufon%s0.scr sets z2 %s0;sets fa12 "%z0`%z1`%z2`%z3`";sets fa11 "%lib/zmnufon%s0.scr";goto zmnubsingl
- if is0,q goback zmnub
- lput "\E[2B\E[80D\E[5CSelection \E[31;1m%s0\&)\E[33;1m does not exist\E[33;1m"
- sleep 20;goback zmnubmulti
- zmnubmultin:
- setn n1 n1+1;sets s0 "zmnufon%n1.scr";if !f%s0 return
- lput "\E[1B\E[80D\E[5C\E[31;1m\&%n1\&)\E[33;1m\E[5C\E[s"
- p?0;findq (title) %s0;if !? return
- sets s0 "%z0";split s0 " " ""
- lput "\E[u\E[35mzmnufon%n1.scr\E[5C\E[33;1m%z1\&\E[33;1m"
- goback zmnubmultin
- zmnubsingl:
- :: fa11 has string which is path/filespec of menu phone page
- type %fa11
- :: If the user wants a title, display it, centered.
- set ifs "`";split fa7
- if %fa9 setn n1 79-%fa9/2
- if %fa9 lput "\E[s\E[1;%n1\&H%z1 %fa9 \E[u%z2"
- lput "\E[10C\E[35;1mLAST: %fa6\&\E[u%z2"
- :: Accept the single digit/letter that selects the phone number.
- set s0 "";acceptl1 s0 "\E[1A\E[80D\E[5C\&_\E[1D"
- set fa6 "BBS";sets fa6 "%fa6 %s0"
- if !%s0 goback zmnub
- if is0,q goback zmenu
- if is0,h set fs12 zmnub;set fs11 zmnubh.scr;goto zmnuhm
- if is0,+;goback zmnubmulti
- p?0;sets s0 "%s0\&)";findq %s0 %fa11
- if ?<1 if afc1>3 goto zmnubsh
- if ?<1 goback zmnub
- split z0 " ";sets remote "%z1"
- goto rmtcall
- zmnubsh:
- lput "\E[10;1H\E[J\E[1B\E[80D\E[0;36;1mPhone entry %s0 does not exist on this phone list."
- lput "\E[1B\E[80DOn this panel, you are restricted to entering just those characters"
- lput "\E[1B\E[80Dnext to the displayed phone list entries."
- lput "\E[1B\E[80DI will display help information now."
- set s1 "-any key to continue-";setn n1 79-%s1/2
- acceptl1 s0 "\E[1B\E[80D\E[%n1\&C%s1"
- set fs12 zmnub;set fs11 zmnubh.scr;goto zmnuhm
- ::
- zmnuc: set fa6 "COLORS";set s0 zmnumain.bak;gosub .%lib/zmnusave.t
- gosub .%lib/zmnucolr.t;goback zmenu
- zmnud: set fa6 "DISCONNECT";goback hangup
- :: The e option depends upon the e.bat being present in DOS PATH
- zmnue: set s0 "!e";gosub execute
- set fa6 "EDIT";goback zmenu
- zmnug:
- set s0 "You entered 'g' on menu to OFF ZCOMM.";setn n1 79-%s0/2
- lput "\E[2J\E[10;%n1\&H%s0\E[12;20H"
- acceptl1 s0 " Do you really want to quit? [%z1\&n\&%z2\&/y]%z2"
- sleep 1;if is0,y;sleep 5;off
- set fa6 "OFF - Undone";goback zmenu
- zmnuh: set fa6 "HELP";type zmnuhelp.scr
- set ifs "`";split fa7
- if %fa9 setn n1 79-%fa9/2
- if %fa9 lput "\E[s\E[1;%n1\&H%z1 %fa9 \E[u%z2"
- acceptl1 s0 "\E[3A\E[13C\E[8;30;31m\&_\E[1D\E[s%z2"
- set fs12 zmnuh
- if is0,m set fs11 zmnuh.scr;goto zmnuhm
- if is0,y goto zmnuhy
- if is0,q goback zmenu
- goback zmnuh
- zmnuhm: display nostat=off
- sets s0 "page %fs11";gosub execute
- zmnuhbranch:
- gosub displayreset
- if !fs12 goback zmenu
- if ifs12,zmnuh goback zmnuh
- if ifs12,zmnum goto zmnum
- goback zmenu
- zmnuhy:
- lput "\E[2J\E[10;24HYamhelp is Pro-YAM feature only"
- set s1 "-any key to continue-";setn n1 79-%s1/2
- acceptl1 s0 "\E[12;%n1\&H%s1";goback zmnuhbranch
- zmnuk: set fa6 "KEYS"
- lput "\E[2J\E[31;1m\&Function Key definitions\E[33;1m"
- keys;acceptl1 s0 "-any key to continue-";goback zmenu
- zmnum: set fa6 "MAINT";type zmnum.scr
- set ifs "`";split fa7
- if %fa9 setn n1 79-%fa9/2
- if %fa9 lput "\E[s\E[1;%n1\&H%z1 %fa9 \E[u%z2"
- acceptl1 s0 "\E[3A\E[8C\&_\E[1D\E[s"
- set fs12 zmnum;set fs11 zmnumh.scr
- if is0,e goto zmnume
- if is0,c set fs11 zmnumc.scr;goto zmnuhm
- if is0,h goto zmnuhm
- if is0,y goto zmnuhy
- if is0,q goback zmenu
- goback zmnum
- zmnume: !e zmnufone.scr
- goback zmnum
- zmnup: !e zmnuparm.ini
- goback zmenu
- zmnuq:
- set ifs "`";split fa7
- lput "\E[2J"
- if afc1>0 lput "\E[35;1m ==> ENTERING ZCOMM COMMAND MODE."
- if afc1>2 lput "\E[36;1m TO RETURN TO MENU, USE %z2\&call zmenu"
- set fa6 "COMMAND MODE"
- return
- zmnuo: sets fa6 "%fa6 ONLINE";goto online
- zmnus: set fa6 "SETUP";type zmnus.scr
- set ifs "`";split fa7
- if %fa9 setn n1 79-%fa9/2
- if %fa9 lput "\E[s\E[1;%n1\&H%z1 %fa9 \E[u%z2"
- acceptl1 s0 "\E[3A\E[8C\&_\E[1D\E[s"
- set fs12 zmnus;set fs11 zmnush.scr
- if is0,e goto zmnuse
- if is0,u goto zmnusu
- if is0,h goto zmnuhm
- if is0,y goto zmnuhy
- if is0,q goback zmenu
- goback zmnus
- zmnuse:
- set fa6 "e.bat zmnuparm.ini"
- !e zmnuparm.ini
- goback zmnus
- zmnusu:
- set s1 "Update using ZCOMM not yet available"
- setn n1 79-%s1/2;setn n2 10
- lput "\E[2J\E[%n2;%n1\&H%s1"
- set s1 "-any key to continue-"
- setn n1 79-%s1/2;setn n2 12
- acceptl1 s0 "\E[%n2;%n1\&H%s1"
- goback zmnus
- :: source %lib/zmnuinit.t
- goback zmnus
- zmnut: set fa6 "TESTPW Pro-YAM feature only"
- goback zmenu
- zmnux: sets phones %lib/phones.t;echo "%phones";sleep 10
- gosub setup.%phones
- return
- online: pat
- pat 24p "NO CARRIER"
- if !c goto onlinex
- display nostat=off
- lput "\E[s\E[1;1H\E[K\E[1;1HONLINE SCRIPT\E[u"
- if !jfa6,ONL sets fa6 "%fa6 ONLINE"
- gosub termmode
- if !c goto onlinex
- t
- if !c goto onlinex
- display nostat=off
- lput "==> ONLINE RETURN"
- set ifs "`";split fa12;if iz0,off return
- if jfa6,BBS goback bbs
- goback zmenu
- onlinex:
- pat
- pat 24 ""
- lput "\E[2J\E[10;1H\E[31;1m ==> END OF SESSION with %fc6"
- sleep 5
- lput "\E[1;1H"
- goback hangup
- rmtcall:
- if !%fc12 gosub getmyname
- set z9 "";set z8 "";set z7 "";set z6 "";set z5 ""
- set ifs " :"
- split remote;sets remote %z0;findq %remote %fa11
- : notes: zmnufone.scr has: #) sysname telno mode script title
- : z0 z1 z2 z3 z4 z5-z9
- set ifs " ";split z0
- if %z5 sets z5 "%z5 "
- if %z6 sets z6 "%z6 "
- if %z7 sets z7 "%z7 "
- if %z8 sets z8 "%z8 "
- if %z9 sets z9 "%z9 "
- :: Set telno string and fa1 string (termmode to use with this remote)
- sets telno "%z2";sets fa1 "%z3"
- sets fc7 "%z4";sets fc6 "%z5%z6%z7%z8%z9"
- sets fa6 "%fa6 %fc6"
- gosub termmode
- :: routine to obtain BBS-unique password value based on remote name
- :: mypasswd value is stored in fc8
- set fc8 "";: null password value
- p?0;findq "bbsname=%remote" %lib/zmnubbpw.ini;if ?>0 set ifs " =";split z0;sets fc8 %z3
- :: special routine just for weird IBM mainframe TSO
- if jfc6,TSO gosub getTSOpasswd
- rmtsyscall:
- lput "\E[2J\E[33;44;1m\E[1;1H\E[5C"
- lput "╔════════════════════════════════════════════════════════════════════╗"
- lput "\E[B\r\E[5C"
- lput "║ To stop, F1 or ALT-N (NUKE) ║"
- lput "\E[80D\E[11CDialing %remote"
- lput "\E[B\r\E[5C"
- lput "╚════════════════════════════════════════════════════════════════════╝"
- lput "\E[1B\E[80D\E[5C\E[35;1m"
- echo "%telno %fa1 %fc7 %fc6 %fa6"
- set fa6 ""
- set fc5 no;: myconnect
- pat
- pat 0 "CONNECT 2400"
- pat 1 "CONNECT 1200"
- pat 2 "BUSY"
- pat 3 "NO CARRIER"
- put "%mprefix\&%telno\&%msuffix"
- wait -f45
- if 0 goto rmtsyscallon
- if 1 goto rmtsyscall12
- if 2 goto rmtsyscallbusy
- echo " NO CARRIER OR ERROR ";set fc2 "NO CARRIER"
- pat
- goto rmtsyscallret
- rmtsyscallbusy: echo " %fc6 NUMBER %telno IS BUSY "
- set fc2 "BUSY last try"
- pat;p?0
- set s0 y
- acceptl1 s0 "Shall I loop on this same number? y/n : [\E[31;1my\E[1;33m]\E[2D"
- if !js0,n goto rmtsyscall
- echo " OK, DIALING IS ABORTED "
- goto rmtsyscallret
- rmtsyscall12:
- echo "speed is 1200"
- echo "termmode is %fa1"
- rmtsyscallon:
- dis -d;set fc5 yes;set fc2 "CONNECTED"
- lput "\E[4C\E[31;1m%fc6 => CONNECTED. SCRIPT: %fc7\n\r"
- sleep 10
- goto rmtsyscallret
- rmtsyscallret:
- if !c||!jfc5,y goto rmtsysnogo
- source zmnulgn.t
- goback online
- rmtsysnogo:
- if jfc5,y source zmnulgn.t;goback online
- sets fa6 "%fa6 NOGO"
- if %fc2 sets fa6 "%fa6 %fc2"
- echo " CALL NOGO ";if afc1>0 gosub dwell
- goback hangup
- busy:
- putw "ATM0H1\r"
- reset:
- put "+++";sleep 10;put "ATZ\r";sleep 10
- put "%fa8";put \r;sleep 5;put \r;sleep 5;return
- getmyname:
- type zmnuname.scr;set fc11 ""
- accept fc11 "\E[36;1m Please enter your first name: \E[35;1m"
- p?0; findq %fc11 zmnuownr.dat
- if ?>0 goto getmynameOK
- accept fc12 "\E[36;1m Please enter your last name: \E[s\E[35;1m"
- lput "\E[u\E[12C\E[36;1mHello to you.\n\r"
- sets s0 %fc10;set fc10 ""
- accept fc10 "\E[36;1m Please enter your city name: \E[35;1m\E[s%fc10\E[u"
- if !%fc10 sets fc10 %s0
- sets s0 %fc9;set fc9 ""
- accept fc9 "\E[36;1m Please enter your state abbr: \E[35;1m\E[s%fc9\E[u"
- if !%fc9 sets fc9 %s0
- close;sets s0 %dircx;sets dircx %lib;create -+ zmnuownr.dat
- echof "%fc11 %fc12 %fc10 %fc9";close;sets dircx %s0
- return
- getmynameOK: set ifs " ";split z0
- sets fc11 %z0
- sets fc12 %z1
- sets fc10 %z2
- sets fc9 %z3
- sets s0 "%fc11 %fc12 calling from %fc10, %fc9"
- setn n1 79-%s0/2
- lput "\n\r\E[31;1m\E[%n1\&C%s0\E[1B\E[80D\E[28C"
- acceptl1 s0 "-any key to continue-"
- return
- :: The TSO system is IBM mainframe time-sharing.
- :: There are many flavors of protocol converters used.
- :: This menu system works with Renex using ZCOMM lsi-adm3a and
- :: selecting "tvi-950" on the Renex menu.
- :: The zmnu3270.kbd mk file works for the above setup.
- getTSOpasswd:
- if %fc4 if %fc3 return
- set fc3 "";set s0 "";set fc4 ""
- accept fc4 "\E[2J\E[0;36mEnter your TSO USERID: "
- accept fc3 "\E[0;36mEnter your TSO password: \E[8m"
- lput "\E[1B\E[K\E[1A"
- accept s0 "\E[0;36mCheck your TSO password: \E[8m"
- if Ifc3,s0 return
- lput "\E[1A\E[K\E[1A\E[K\E[2B"
- lput "\E[80D\E[31;1mPassword values do not match exactly\E[2A\E[80D"
- goback getTSOpasswd
- reset: set phones %lib/phones.t
- return
- offyam: lput "\E[2J\E[3;1H"
- if %fa9 setn n1 79-%fa9/2
- if %fa9 lput "\E[10;%n1\&H\E[0;31;1m %fa9 \E[1B\E[80D"
- lput "\E[34C\E[5;37;1mOFF ZCOMM\E[1B\E[80D"
- lput "\E[0;31;1m\E[24CRETURNING TO SYSTEM FROM ZCOMM\E[1B\E[80D"
- sleep 20
- return
- :: TEST PASSWORD GENERATION
- testpw: lput "\E[2J\E[31;1m\E[1;34HTEST PASSWORD GENERATION\E[1B"
- sets savermt %remote
- sets savepw %xpassword
- acceptl remote "\E[33;1m\E[2;5HEnter name of remote system: "
- acceptl xpassword "\E[36;1m\E[3;12HEnter password value: "
- lput "\E[37;1m\E[4;12HGenerated password is \PXXXXXXXX"
- lput "\E[31;1m\E[5;25HAnother? "
- if y goback testpw
- cls
- sets remote %savermt
- sets xpassword %savepw
- set savermt ""
- set savepw ""
- return
- download: obey "@display nostat=off"
- obey "@rb -y"
- if jtermmode,A obey "@display stat=off"
- obey "@ena %termmode"
- return
- upload: obey "@display nostat=off"
- acceptl upfile "\E[31;1mFilename(s) to send? "
- obey "@szb %upfile"
- if jtermmode,A obey "@display stat=off"
- return
- :: This part of the setup script initializes the zmnuparm.t script
- :: that is the script representation of the .ini file contents and
- :: is used for speeding up the initialization process.
- :: This part of the file is placed late in the zmenu.t file in order
- :: to make the zmenu.t file more efficient.
- setupcold:
- :: nullify dircx and open a new zmnuparm.t file for building
- ki;kill;close
- sets dircx %drive:%home;create zmnuparm.t
- echof "setup:";: include helpful comments in script file
- echof " :: This file contains the .T commands to init your zmenu"
- echof " :: system more quickly than reprocessing the .ini file."
- setc s0
- lput "\E[14;20HSETUP HOT START FILE RUNNING NOW"
- echof "%s0"
- setc s0 " lput \"\E[1B\E[80D\E[19C\E[s\"";echof "%s0"
- lput "\E[2J\E[10;20HNow setting up user parameter values from .ini file."
- lput "\E[12;20HPlease stand by...\E[1B\E[80D\E[19C"
- :: DEFINE CONSTANTS FOR ZMENU.T
- :: These are variables that are not changed by .ini file
- :: suppress informational messages from ZCOMM
- pv-1;echof " pv-1;: verbose switch"
- set fc1 3;set s0 msglevel;gosub inigrab
- echof " setn fc1 %fc1"
- if %s0 echof " setn fc1 %s0"
- set s0 \x22
- set s1 "\E[5A\E[80D\E[25C";set s2 "\E[u"
- echof " if afc1>0 if afc1==1 echo %s0%s1 EXPERT msglevel%s2%s0"
- echof " if afc1>0 if afc1==2 echo %s0%s1 ADVANCED msglevel%s2%s0"
- echof " if afc1>0 if afc1==3 echo %s0%s1 AVERAGE msglevel%s2%s0"
- echof " if afc1>0 if afc1==4 echo %s0%s1 LEARNING msglevel%s2%s0"
- echof " if afc1>0 if afc1==5 echo %s0%s1 NOVICE msglevel%s2%s0"
- :: Z: hot key column, d: set incoming dates to local, S: XON timeout
- pZ72;pd1;pS5
- echof " :: Z hot key col, d: incoming dates local, S: XON timeout"
- echof " pZ72;pd1;pS5"
- setc s0 " set onexit \"@gosub offyam\""
- echof "%s0"
- ::
- :: DEFINE VALUES HELD ONLY IN ZCOMM NUMERIC OR STRING PARAMETERS
- :: USING CONTENTS OF .INI FILE
- ::
- :: inigrab gosub obtains ini data from zmnuparm.ini given s0 string
- :: In this block, we initialize user-selectable parameters of all
- :: types using file zmnuparm.ini
- :: Example of how this works:
- :: 1. set string s0 to string value to find in zmnuparm.ini
- :: 2. gosub inigrab
- :: 3. inigrab searches file zmnuparm.ini for string whose name is in s0
- :: If found, the remainder of the line after name is set in
- :: string s0.
- :: 4. Set string variable to value in s0
- ::
- :: Set up our personal numeric parameters
- ::
- :: colors: 0=blk 1=blu 2=grn 3=cyan 4=red 5=mag 6=brn
- :: 7=white 8=gry 9=brtblu 10=ltgrn 11=ltcyan 12=ltred
- :: 13=ltmag 14=ltyel 15=ltwhite
- ::
- :: norm color reverse hilite status blink dim
- :: brt yellow mag on blu red dk grn red grey
- ::
- :: set default color codes in ANSI.SYS style
- :: n=normal, h=high, b=blink, r=rev, s=stats
- :: set parameters for ZCOMM color modes
- echof " :: set default color codes in ANSI.SYS style"
- echof " :: n=normal, h=high, b=blink, r=rev, s=stats"
- echof " :: set parameters for ZCOMM color modes"
- echof " if dc pn0x0e;pr0x1d;p*0x0c;ps0x02;p@0x8c;pF0x08"
- :: if not color display, set alternatives to colors
- echof " if !dc pn0x07;pr0x70;p*0x0f;ps0x70;p@0x87;pF0x08"
- set fa7 "y`\E[0;31;1m`\E[0;33;1m`";: default color modes: hi/normal
- set s0 fa7;gosub inigrab;if %s0 sets fa7 "%s0"
- setc s0 " set fa7 \""
- sets s1 "%fa7";setc s2 "\""
- echof "%s0%s1%s2"
- ::
- :: Where are scripts stored? This lets you use something other
- :: than the home string.
- sets lib "%drive:%home";set s0 zcommlib;gosub inigrab;if %s0 sets lib %s0
- echof " :: Define location of script files "
- ife %s0 echof " set lib %s0";else echof " sets lib %drive:%home"
- ::
- :: what disks are available for ZCOMM to use?
- echof " :: Define which disks can be accessed"
- set disks "abc";set s0 disks;gosub inigrab;if %s0 sets disks %s0
- echof " set disks %disks"
- ::
- :: Set up video screen size to be used. 80 cols is almost universal.
- p$80;p#24
- echof " :: Define video screen cols and rows"
- echof " p$80;p#24"
- set s0 scrcols;gosub inigrab
- if %s0 echof " p$%s0"
- set s0 scrrows;gosub inigrab
- if %s0 echof " p#%s0"
- ::
- :: support graphic displays by default. Pick up user's termmode
- set fa1 -8n;set s0 termmode;gosub inigrab;if %s0 sets fa1 "%s0"
- echof " set fa1 %fa1"
- ::
- :: Set up cpuspeed pa... numeric variable
- set s0 cpuspeed;gosub inigrab;if %s0 sets s1 "pa%s0";sets s0 %s1
- if %s0 echof " :: Override cpu speed"
- if %s0 echof " %s0"
- ::
- :: string kbd101 says whether you use 101-key keyboard
- :: Setting kbd101 yes when you don't have one causes ZCOMM to loop
- :: numeric parm pK
- set s0 kbd101;gosub inigrab;pK0;if js0,y pK1
- if js0,y echof " pK1;: declare 101-key keyboard in use"
- set s0 "\x22"
- echof " if afc1>4 echo %s0 101-key keyboard in use %s0"
- ::
- :: strings: KERMITx in zmnuparm.ini are used to set values
- ::
- :: defaults are set in following section
- :: K=y is auto-download enable for Kermit
- set s0 KERMITK;gosub inigrab;if js0,y ena -K;echof " ena -K;: enable kermit auto-download"
- :: L/l is for kermit protocol packet size
- set s0 KERMITl;gosub inigrab;kermit pl94;echof " kermit pl94"
- if %s0 sets s1 "kermit pl%s0";sets s0 "%s1";echof " %s0"
- set s0 KERMITL;gosub inigrab;kermit pL94;echof " kermit pL94"
- if %s0 sets s1 "kermit pL%s0";sets s0 "%s1";echof " %s0"
- :: s is timeout for XON
- set s0 KERMITs;gosub inigrab;kermit ps5;echof " kermit ps5"
- if %s0 sets s1 "kermit ps%s0";sets s0 "%s1";echof " %s0"
- :: w is window size for sliding windows
- set s0 KERMITw;gosub inigrab;pw31;echof " kermit ps31"
- if %s0 sets s1 "kermit pw%s0";sets s0 "%s1";echof " %s0"
- :: 7 is 7-bit transmission mode (usually needed for IBM mainframe
- :: kermit flavors)
- set s0 KERMIT7;gosub inigrab;kermit p71;echof " kermit p71"
- if %s0 sets s1 "kermit p7%s0";sets s0 "%s1";echof " %s0"
- ::
- :: menumode=on/off on: menus return to menu display
- :: fa12=menumode/menuinit/menupage/timezone_name/
- :: menumode is stored in variable fa12 as "y`" or "n`" 1st string
- set fa12 "off`";set s0 menumode;gosub inigrab;if %s0 sets fa12 "%s0\&`"
- sets s0 "%fa12"
- setc fa12 "%s0\&y`"
- set s0 menupage;gosub inigrab;sets s1 "%fa12";sets s2 %s0
- setc fa12 "e`";set s2 ""
- if %s0 sets s2 %s0;setc fa12 "%s0\&`"
- sets fa11 "%lib/zmnufone.scr"
- if %s2 setc fa11 %lib/zmnufon%s2\&.scr
- :: Record default menupage value in fa11 for menufone filename
- echof " set fa11 %fa11"
- setc s0 "%s1\&%fa12"
- sets fa12 "%s0"
- set s0 timezone;gosub inigrab;sets s1 "%fa12"
- set fa12 EST;if %s0 sets fa12 "%s0"
- if ifa12,GMT pz0
- if ifa12,EST pz300
- if ifa12,EDT pz240
- if ifa12,CST pz360
- if ifa12,CDT pz300
- if ifa12,MST pz420
- if ifa12,MDT pz360
- if ifa12,PST pz480
- if ifa12,PDT pz420
- if ifa12,AST pz460
- :: OK, so what timezone names for Alaska and Hawaii??
- setc s0 "%s1\&%fa12\&`"
- sets fa12 "%s0";echof " set fa12 %s0"
- ::
- :: modem initialization string defined by user as "modeminit"
- set fa8 "ATS11=45L1H&C1";set s0 modeminit;gosub inigrab
- set s1 \x22
- if %s0 setc fa8 "%s0"
- echof " set fa8 %s1%fa8%s1"
- ::
- :: pick up modem speed
- set fa10 1200;set s0 modemspeed;gosub inigrab;if %s0 sets fa10 %s0
- if %s0 sets s1 "speed %s0";sets s0 "%s1"
- echof " %s0"
- echof " set fa10 %fa10"
- ::
- :: init modem with user's string
- set s0 \x22
- echof " if afc1>4 echof %s0 Issuing modem init string %s0"
- set s0 "\""
- set s1 "\\"
- set s2 "r"
- echof " put %s0+++%s0;sleep 5"
- echof " put %s0%fa8%s1%s2%s0;sleep 5"
- echof " put %s0%s1%s2%s0"
- echof " ki;kill;close"
- ::
- :: string partfile says whether you want to keep partial downloaded files
- :: any value other than "keep" means delete.
- set s0 partfile;gosub inigrab;if !jpartfile,keep pR1;echof " pR1"
- ::
- :: set up some common function key values (allow zmnuparm.ini override)
- set f6 "@accept s2 Receive-File:;rc %s2";set s0 f6;gosub inigrab
- setc s0 "\"";setc s1 "\""
- if %f6 echof " set f6 %s0%f6%s1"
- set f7 "@accept s1 Send-File:;sz %s1";set s0 f7;gosub inigrab
- setc s0 "\"";setc s1 "\""
- if %f7 echof " set f7 %s0%f7%s1"
- ::
- :: what sort of handshake do you use?
- set s0 handshake;gosub inigrab
- if %s0 sets s1 %s0;sets s0 "ha %s1";echof "%s0"
- ::
- :: what dialing prefix does your modem use?
- set mprefix "ATDP";set s0 mprefix;gosub inigrab;if %s0 sets mprefix %s0
- echof " set mprefix %mprefix"
- ::
- :: menutitle for menu pages
- :: set menutitle "";set s0 menutitle;gosub inigrab
- set fa9 "";set s0 menutitle;gosub inigrab;if %s0 sets fa9 "%s0"
- if %s0 setc s1 " set fa9 \"";sets s2 "%s1%s0";setc s0 "%s2\""
- echof "%s0"
- ::
- :: process display stuff mndispl1, mndispl2, emulate for video
- :: emulate fa5 whole variable
- :: mndispl1 fa4 whole variable
- :: mndispl2 fa3 whole variable
- set fa4 "";set fa3 "";set fa5 vt100
- set s0 emulate;gosub inigrab
- if %s0 setc s1 "\"";sets fa5 " display %s0";sets s2 " set fa5 %s1 display %s0 %s1";echof "%s2"
- set s0 mndispl1;gosub inigrab
- if %s0 setc s1 "\"";sets fa4 " display %s0";sets s2 " set fa4 %s1 display %s0 %s1";echof "%s2"
- set s0 mndispl2;gosub inigrab
- if %s0 setc s1 "\"";sets fa3 " display %s0";sets s2 " set fa3 %s1 display %s0 %s1";echof "%s2"
- echof " %fa5";echof " %fa4";echof " %fa3"
- mk
- set fc11 "";set fc12 "";: first and last name variables
- ::
- :: set up directory names where to capture/ZCOMM/download/upload
- :: Set up defaults to point using symbolic drive, home directories
- sets dircx "%drive:/capture";set s0 dircx;gosub inigrab;if %s0 sets dircx "%s0"
- sets dirfx "%drive:%home";set s0 dirfx;gosub inigrab;if %s0 sets dirfx "%s0"
- sets dirrx "%drive:/download";set s0 dirrx;gosub inigrab;if %s0 sets dirrx "%s0"
- sets dirsx "%drive:/upload";set s0 dirsx;gosub inigrab;if %s0 sets dirsx "%s0"
- echof " set dircx %dircx;: capture "
- echof " set dirfx %dirfx;: files"
- echof " set dirrx %dirrx;: download"
- echof " set dirsx %dirsx;: upload/send"
- set s0 \x22
- echof " if afc1>0 echof %s0 zmnuparm.t complete %s0"
- close;goback setuphot
- : ==== System names to call
- vaxlug: goback rmtcall
- customs: goback rmtcall
- follies: goback rmtcall
- freesp: goback rmtcall
- freesp2: goback rmtcall
- glib: goback rmtcall
- glib1: goback rmtcall
- glib2: goback rmtcall
- glib3: goback rmtcall
- mframe: goback rmtcall