home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / modem / cs_mac08.zip / CS-COMMO.MAC < prev    next >
Text File  |  1993-10-24  |  50KB  |  1,105 lines

  1.  
  2.  ┌────────────────────────────────┐
  3.  │  Chuck Seyboldt's COMMO Macro  │   CS-MAC08:CS-COMMO.MAC
  4.  └────────────────────────────────┘
  5.  
  6.   *  Variables are set in a CS-MACxx.CFG file (xx = version number).
  7.   *  You may rename CS-COMMO.MAC to COMMO.MAC or use Commo's "/m" switch
  8.   *   (as in /mcs-commo.mac) to allow COMMO.MAC and CS-COMMO.MAC to coexist.
  9.   *  See CS-MAC.MAC for more explanations.
  10.   *
  11.      Thanks to Fred Brucker for Commo and to ...
  12.      -  Jim Bennett for many excellent suggestions
  13.      -  Jim Rahfeldt for macro streamlining ideas
  14.      -  Paula Stockholm for serious troubleshooting
  15.      -  Dave Legault for the ongoing ideas and support
  16.      -  Kevin Nathan for insightful new challenges and effort
  17.      -  My wife, Joy, for putting up with a Commo addict
  18.   *
  19.   *  With this line in COMMO.SET, Commo starts with the :start macro
  20.   *       └──┴─────> {mac=start}            Startup macro label
  21.   *
  22.   *  I use the :start/cs-macxx.cfg  tool for easy portability from one machine
  23.   *  to another.  Many directories are defined in CS-MACxx.CFG.
  24.  
  25. !    You need the edit the file you are reading  -AND-  COMMO.FON.
  26.   *  Editing is required only at the  *END*  of CS-COMMO.MAC.
  27.   *
  28. !    Edit the .FON links at the _very_ end of this file [^PgDn].
  29. !    Please edit the autopilot before enabling it with "setv auto,y".
  30.   *  There is no other required editing in the CS-MAC series.
  31.  
  32.  ┌─────────────────┐
  33.  │  Startup Macro  │    In COMMO.SET, {mac=start}  Startup macro label
  34.  └─────────────────┘
  35.  
  36.  {:start}{:af3}
  37.          {clea}
  38.          {setv ver,08}                          ;Version level set here
  39.          {ifex %_hom%cs-mac*.cfg,,new_user}     ;If no .CFG exists, make one
  40.          {ifex %_hom%cs-mac%ver%.cfg,,upgrade}  ;If old .CFG exists, upgrade
  41.          {rope %_hom%cs-mac%ver%.cfg,alcc}      ;open .CFG file
  42.  {:init_loop}
  43.          {read line}                            ;read CS-MACxx.CFG
  44.          {inst line,*}   {ifco init_loop}       ;skip comments in .cfg
  45.          {comp line}     {ifco init_loop}       ;skip blank lines in .cfg
  46.          {inst line,,}   {ifco ,init_loop}      ;comma reqd in active .cfg line
  47.          {setv pos,%_pos}       {decr pos}
  48.          {subs var,1,%pos,%line}                ;all before comma is var_name
  49.          {inst line,  }  {ifco ,no_com}         ;two consecutive spaces separate
  50.          {setv pos,%_pos}       {decr pos}      ; variable def'n from comment
  51.          {subs line,1,%pos,%line}
  52.  {:no_com}
  53.          {inst line,,}
  54.          {setv pos,%_pos}
  55.          {leng %line}
  56.          {setv len,%_len}
  57.          {decr len,%pos}        {incr pos}
  58.          {subs valu,%pos,%len,%line}
  59.          {setv %%var,%valu}                     ;setv according to .cfg
  60.          {goto init_loop}                       ;loop until .cfg all read
  61.  
  62.  
  63.  {:upgrade}                                     ;if old .cfg is found make
  64.          {setv ug,y}                            ; a new one for this version
  65.          {macl cs-mac.mac,upgrade}
  66.  {:new_user}                                    ;if *NO* .cfg is found make one
  67.          {setv new,y}                           ;autoload macro menu; new user
  68.          {macl cs-mac.mac,new_user}
  69.  
  70.  
  71.  {:alcc} {comp debug,y}  {ifco retu}
  72.          {capt n,%cap}                          ;capture filename from .CFG
  73.          {setv-e _uselog,DSZLOG}                ;DSZlog info > COMMO.LOG
  74.          {setv grafix,%color%%fast}             ;combine %color & %fast
  75.  {:alc}                                         ;CLEAR function ...
  76.          {capm s}                               ; reset capture to 'screen' mode
  77.          {parm ,,,,0}                           ; plus resets directories
  78.          {setv abbr}    {setv bbsid}            ; and working variables
  79.          {setv line}    {setv var}
  80.          {setv valu}    {setv pos}
  81.          {setv color}   {setv fast}
  82.          {setv set}     {setv len}
  83.          {setv pmail}                           ;ZIPNews personal mail flag
  84.          {setv m_call,aln}                      ;return flag for multidial
  85.          {clea}
  86.          {setv row,1} {setv col,1}
  87.          {comp new,y} {ifco alm}                ;New user taken directly to menu
  88.          {comp ug,y}  {ifco alm}                ;Upgrade  taken directly to menu
  89.  {:no_new}
  90.          {setv ring,0}  {setv ring_c,0}         ;Autopilot ring counters
  91.          {comp auto,y}{ifco auto}               ;Is autopilot enabled?
  92.                                                 ;END of startup macro
  93.  {:retu} {retu}                                 ;Very handy labelname
  94.                                                                                 macr_do
  95.  Run a Macro               Choose Macro to Run
  96.  
  97.                          ╒═══════════════════════╕
  98.  Add BBSID to COMMO.FON  │ CS-MAC.MAC,new_bbsid  │  {macl cs-mac.mac,new_bbsid}
  99.  New modem config        │ CS-MAC.MAC,modem      │  {macl cs-mac.mac,modem}
  100.  Run Agenda Generator    │ CS-MAC.MAC,s_menu     │  {setv auto} {macl cs-mac.mac,s_menu}
  101.  Run ACTION processor    │ ACTION.MAC,action     │  {macl action.mac,action}
  102.  Macro under development │ HOLO.MAC,start_ho     │  {macl holo.mac,start_ho}
  103.  Strip comments from MAC │ CS-MAC.MAC,strip      │  {macl cs-mac.mac,strip}
  104.  Translate MODEMs.DAT    │ CS-MAC.MAC,x_late     │  {macl cs-mac.mac,x_late}
  105.  RingLOG Macro   {:sf5}  │ RINGLOG.MAC,g01       │  {setv set} {comp auto,y} {ifco auto} {macl ringlog.mac,g01}
  106.  DosFunc Macro   {:nf9}  │ DOSFUNC.MAC,g01       │  {macl dosfunc.mac,g01}
  107.  Make ACTION     {:alf}  │ ACTION.MAC, alf       │  {macl action.mac,alf}
  108.  Load HOST Mode  {:af5}  │ MACROBBS.MAC,bbs      │  {macl macrobbs.mac,bbs}
  109.                          │ EDIT File Menu        │  {call alq} {}
  110.                          ╘═══════════════════════╛
  111.  
  112.  
  113.  
  114.  
  115.  
  116.                                                                                 upld
  117. Send a File                      UpLoad Protocols
  118.  
  119.                                 ╒════════════════╕
  120.                                 │  Zmodem        │                              {setv m_call,z_up} {call cpu} {:z_up} {setv m_call} {exec-n %z_prog port %_por ha bo sz -m @%_hom%^(send^).lst} {call del_lst} {}
  121.                                 │  Zmodem/REP    │                              {inpu file,.REP to Upload} {ifex %repdr\%file.rep,,no_rep} {exec-N %z_prog port %_por ha bo sz -mu %repdr%\%file%.rep} {:no_rep} {}
  122.                                 │  Ymodem/G      │                              {setv m_call,y_up} {call cpu} {:y_up} {setv m_call} {symo-gk @%_hom%^(send^).lst} {call del_lst} {}
  123.                                 │  1k-Xmodem     │                              {setv proto,1K-Xmodem} {call gfnu} {sxmo-k %file}   {setv proto}  {}
  124.                                 │  Xmodem CRC    │                              {setv proto,Xmodem-CRC}{call gfnu} {sxmo %file}     {setv proto}  {}
  125.                                 │  HS/Link       │                              {setv m_call,h_up} {call cpu} {:h_up} {setv m_call} {exec-n %dosdir%\hslink.exe -@ -I2 -NV -P%_por% @%_hom%^(send^).lst} {call del_lst} {}
  126.                                 │                │
  127.                                 │  ASCII         │                              {setv proto,ASCII} {call gfnu} {asci-e %file}       {}
  128.                                 ╘════════════════╛
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.                                                                                 downld
  139. Receive a File                 DownLoad  Protocols
  140.  
  141.                                 ╒════════════════╕
  142.                                 │  Zmodem        │                              {exec-n %z_prog port %_por rz -mr %dldir}  {}
  143.                                 │  Zmodem/QWK    │                              {exec-n %z_prog port %_por rz -m  %qwkdr}  {}
  144.                                 │  Ymodem/G      │                              {rymo-gy %dldir}  {}
  145.                                 │  1k-Xmodem     │                              {setv file,%dldir%\} {inpu file,Filename to Download (1k-Xmodem)}    {rxmo %file}    {}
  146.                                 │  Xmodem CRC    │                              {setv file,%dldir%\} {inpu file,Filename to Download (Xmodem CRC)}   {rxmo %file}    {}
  147.                                 │  HS/Link       │                              {exec-n %dosdir%\hslink.exe -@ -C -I2 -NV -P%_por% -R -O -K -U%dldir} {}
  148.                                 │  Ymodem        │                              {rymo-y %dldir}   {}
  149.                                 │  ASCII         │                              {call chm}        {}
  150.                                 ╘════════════════╛
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  {:alm}  {setv ug} {setv new}
  161.          {macr macr_do}   {retu}        ;Run a Macro menu
  162.  {:pgd}  {macr downld}    {retu}        ;Call Download Menu
  163.  {:pgu}  {macr upld}      {retu}        ;Call Upload Menu
  164.  {:cpu}  {exec-n cd %uldir}             ;Pick N Send
  165.          {ifex %_hom%^(send^).lst,retu}
  166.          {comp ext_fl}
  167.          {ifco ,pns}
  168.          {macl select.mac,start}
  169.  {:pns}  {exec-d %ext_fl %_hom%^(send^).lst -F}
  170.          {retu}
  171.  
  172.  {:del_lst}
  173.          {exec-n del %_hom%^(send^).lst}
  174.          {retu}
  175.  
  176.  ┌───────────────────────┐
  177.  │  Get Upload FileName  │
  178.  └───────────────────────┘
  179.   *  This version of :GFNU has some extra features.  If you omit the file
  180.   *  .extension, :gfnu looks for the file, adds ".ZIP" and looks for the file,
  181.   *  if the file doesn't exist, a masked directory list is presented to jog
  182.   *  your memory.
  183.  
  184.  {:gfnu} {sete-p0 retu}
  185.          {setv file,%uldir\%mask} {setv dmask} {setv mask}
  186.          {inpu file,Filename for %proto% upload (.ZIP default)}
  187.          {ifex %file,retu}
  188.          {leng %uldir}  {setv dr_len,%_len}
  189.          {leng %file}   {setv f_len,%_len}
  190.          {incr dr_len}  {decr f_len,%dr_len}  {incr dr_len}
  191.          {inst file,.}  {ifco chek}
  192.          {setv file,%file%.zip}
  193.  {:chek} {ifex %file,retu}
  194.  {:mask} {subs dmask,%dr_len,1,%file}
  195.          {subs mask,%dr_len,%f_len,%file}
  196.          {exec-nw5 dir %uldir%\%dmask%*.*}
  197.          {goto gfnu}
  198.  
  199.  ┌───────────────────────────────┐
  200.  │  Send DESC.SDI Automatically  │
  201.  └───────────────────────────────┘
  202.   *  This INSERT-key routine sends either desc.sdi or file_id.diz
  203.   *  If you use the INS routine immediatly after an upload, the
  204.   *  correct filename will already be in the input window.
  205.  
  206.  {:ins}  {ifca ,retu}                   ;Auto Insert file descriptions
  207.          {sete-p0 retu}
  208.          {comp file}    {ifco ,n_zup}
  209.          {ifex %_hom%^(send^).lst,,retu}
  210.          {rope %_hom%^(send^).lst}
  211.          {read file}    {rclo}
  212.  {:n_zup}{inpu file,Filename to search for description}
  213.          {comp file}    {ifco retu}     {ifex %file,,retu}
  214.          {exec-d %pk_un -v %file desc.sdi file_id.diz}
  215.          {ifer 1,retu}  {setv filen,file_id.diz}
  216.  {:add_dsc}
  217.          {exec-d %pk_un -v %file %filen}
  218.          {ifer 1,chk_sdi}
  219.          {exec-n %pk_un -o %file %ramdr\ %filen}
  220.          {rope %ramdr\%filen,retu}
  221.  {:diz_lp}
  222.          {setv filen}
  223.          {read line}    {send ~~%line|}
  224.          {goto diz_lp}
  225.  {:chk_sdi}
  226.          {setv filen,desc.sdi}
  227.          {goto add_dsc}
  228.  
  229.  ┌───────────────────────────┐
  230.  │  Select Upload Directory  │
  231.  └───────────────────────────┘
  232.   *  This Alt-U macro has a twist to it.  Pressing the ESCAPE key while in
  233.   *  the INPUt window doesn't exit.  Instead the ESCAPE key cycles through
  234.   *  a variety of U/L directory choices before exiting.
  235.  
  236.  {:alu}  {setv count,0}
  237.  {:conf} {incr count}
  238.          {sete-p0 ul%count}
  239.          {inpu uldir,Select Upload directory (omit trailing"\")}
  240.          {ifex %uldir\NUL,retu,alu}
  241.  {:ul1}  {setv uldir,%_hom}
  242.          {leng %_hom}           {setv len,%_len}
  243.          {decr len}             {subs uldir,1,%len,%uldir}
  244.          {setv len}             {goto conf}
  245.  {:ul2}  {setv uldir,%ramdr}    {goto conf}
  246.  {:ul3}  {setv uldir,%repdr}    {goto conf}
  247.  {:ul4}  {setv uldir,%dldir}    {goto conf}
  248.  {:ul5}  {retu}
  249.  
  250.  ┌──────────────────┐
  251.  │  File-Edit-Menu  │
  252.  └──────────────────┘
  253.  {:pad}  {setv n_ver,0%n_ver} {retu}
  254.  
  255.  {:alq}  {setv n_ver,%ver} {incr n_ver}
  256.          {leng %n_ver} {comp _len,1} {ifco-lec pad}
  257.          {setv _menu1, F   any File}
  258.          {setv _menu2, T   Table.mac}
  259.          {setv _menu3, L   Logon.mac}
  260.          {setv _menu4, A   Action.mac}
  261.          {setv _menu5, S   cS-mac.mac}
  262.          {setv _menu6, X   New in v.%n_ver}
  263.          {setv _menu7, M   Macrobbs.mac}
  264.          {setv _menu8, H   Holo.mac}
  265.          {setv _menu9, K   assign.Key}
  266.         {setv _menu10, D   aDdress book}
  267.         {setv _menu11, C   Commo.mac}
  268.         {setv _menu12, N   holo.mac NLBBS}
  269.         {setv _menu13, I   Ideas}
  270.         {setv _menu14, Q   Quiz.mac}
  271.         {setv _menter,auto}
  272.         {setv _mlabel,ed_a,,ed_c,ed_d,,ed_f,ed_g,ed_h,ed_i,,ed_k,ed_l,ed_m,ed_n,,,ed_q,,ed_s,ed_t,,,,ed_x}
  273.          {menu 18,22, EDIT Menu }
  274.          {goto auto}
  275.  
  276.  {:ed_f} {call nf5} {goto auto}
  277.  {:ed_t} {setv file,%_hom%table.mac}    {goto ed_it}
  278.  {:ed_l} {setv file,%_hom%logon.mac}    {goto ed_it}
  279.  {:ed_a} {setv file,%_hom%action.mac}   {goto ed_it}
  280.  {:ed_s} {setv file,%_hom%cs-mac.mac}   {goto ed_it}
  281.  {:ed_x} {setv file,%_hom%%n_ver}       {goto ed_it}
  282.  {:ed_m} {setv file,%_hom%macrobbs.mac} {goto ed_it}
  283.  {:ed_h} {setv file,%_hom%holo.mac}     {goto ed_it}
  284.  {:ed_k} {edit %_hom%assign.key}        {goto auto}
  285.  {:ed_d} {edit %savedir\address}        {goto auto}
  286.  {:ed_c} {macl cs-mac.mac,ed_cmac}
  287.  {:ed_n} {setv file,%_hom%dl\test\*.mac}{goto ed_it}
  288.  {:ed_i} {setv file,%savedir\ideas}     {goto ed_it}
  289.  {:ed_q} {setv file,%_hom%quiz.mac}     {goto ed_it}
  290.  
  291.  {:ed_it}{comp ext_ed}
  292.          {ifco in_ed}
  293.          {exec-n %ext_ed %file}          {goto auto}
  294.  {:in_ed}{inst file,*}                   {ifco auto}
  295.          {inst file,?}                   {ifco auto}
  296.          {edit %file}                    {goto auto}
  297.  
  298.  ┌──────────────────────────────┐
  299.  │  Toggles and Autopilot mode  │
  300.  └──────────────────────────────┘
  301.  {:alt}  {togg}
  302.  {:a_yn} {setv _menu1,    Y yes}
  303.          {setv _menu2,    N no}
  304.          {setv _menu3,    C clear ring}
  305.          {setv _menter,to_c}
  306.          {setv _mlabel,,,to_c,,,,,,,,,,,to_n,,,,,,,,,,,to_y}
  307.          {menu 7,23,Autopilot ON?}  {retu}
  308.  {:to_n} {setv auto}
  309.  {:to_c} {setv set} {setv pmail} {setv ring,0} {goto auto}
  310.  {:to_y} {setv auto,y} {goto auto}
  311.  
  312.  ┌───────────────────────┐
  313.  │  Toggle CAPTURE mode  │
  314.  └───────────────────────┘
  315.   *  This capture function provides a TOGGLE.  Ctl-Home keystroke changes
  316.   *  the status of capture and provides datestamp marks in the capture file.
  317.  
  318.  {:chm}  {comp capture,on} {ifco cof}
  319.          {setv capture,on}
  320.          {capt y,%savedir\%_mon%%_day%.cap}
  321.          {exec-n echo OPENED  ■  %_dat %_tim^j>> %_cap}      {retu}
  322.  {:cof}  {setv capture}    {capture n}
  323.          {exec-n echo CLOSED  ■  %_dat %_tim^j■-■-■>> %_cap} {retu}
  324.  
  325.  ┌───────────────────────┐
  326.  │  Toggle Doorway Mode  │
  327.  └───────────────────────┘
  328.   *  This doorway mode toggle has a feature that you need to be aware of.
  329.   *  The %xpert% flag will make this macro run through a series of possible
  330.   *  "drop to DOS" commands for a variety of hosts (like the :alu macro).
  331.   *  If %xpert% is null, this function is a simple toggle.
  332.  
  333.  {:al=}  {comp dway}              {ifco ,ext}
  334.          {setv dway, }
  335.          {comp xpert}             {ifco door}
  336.          {setv count,0}
  337.  {:donf} {incr count}
  338.          {sete-p0 dw%count}
  339.          {inpu dway,Host Doorway Command?}
  340.          {comp dway}              {ifco retu}
  341.          {send %dway}                                   ;BBSware Drop to DOS command
  342.  {:door} {door-m0}                {}
  343.  {:dw1}  {setv dway,9 y|}         {goto donf}           ;Various BBSware
  344.  {:dw2}  {setv dway,aview|}       {goto donf}           ;Various BBSware
  345.  {:dw3}  {setv dway,d~~~~%pword2|}{goto donf}           ;"drop to DOS"
  346.  {:dw4}  {setv dway}              {retu}
  347.  {:ext}  {door-m0}
  348.          {setv dway}
  349.          {comp xpert}             {ifco retu}
  350.          {send exit|}                                   ;Return from DOS to BBSware
  351.          {retu}
  352.  ┌───────────────────┐
  353.  │---*  General  *---│
  354.  └───────────────────┘
  355.  {:alw}  {setv file}                                    ;Any Command at all
  356.          {inpu file,Enter any DOS Command:}
  357.          {comp file} {ifco retu} {exec-W %file} {}
  358.  
  359.  {:list_it}
  360.          {ifex %file,,auto}
  361.          {comp ext_li}
  362.          {ifco in_li}
  363.          {exec-n %ext_li %file}          {goto auto}
  364.  {:in_li}{inst file,*}                   {ifco auto}
  365.          {inst file,?}                   {ifco auto}
  366.          {edit %file}                    {goto auto}
  367.  
  368.  ┌──────────────────────────┐
  369.  │---* Terminal Control *---│
  370.  └──────────────────────────┘
  371.  {:al0}  {ligh}   {retu}                                ;Toggle Signal Lights
  372.  {:al3}  {soun}   {retu}                                ;Toggle Mister Sound
  373.  {:al6}  {loca}   {retu}                                ;Toggle Local Echo
  374.  {:all}  {dpar}   {capt}          {retu}                ;Access Connect Parms
  375.  {:al-}  {statusline}             {retu}                ;Toggle Status Line
  376.  {:alv}  {comp vid}               {ifco v_m1}           ;Toggle video mode
  377.          {vide-m0}{setv vid}      {retu}
  378.  {:v_m1} {vide-m1}{setv vid,1}    {retu}
  379.  ┌──────────────────────┐
  380.  │---* Send Strings *---│
  381.  └──────────────────────┘
  382.  {:nf1}  {ifca ,hlp}              {send ~~%name|} {retu};Send Name
  383.  {:cf1}  {send %handle|}          {retu}
  384.  {:nf2}  {send %_pas|}            {retu}                ;Send Password
  385.  {:af2}  {send %v_ph|}            {retu}                ;Send Voice Phone No.
  386.  {:cf2}  {send %d_ph|}            {retu}                ;Send Data Phone No.
  387.  {:nf0}  {ifca ,retu}                                   ;Send Signature
  388.  {send                                                     %sig%|~|~SN|}{}
  389.  ┌───────────────────┐
  390.  │---* Utilities *---│
  391.  └───────────────────┘
  392.  {:cra}  {setv file,%savedir\savescro}     {goto ed_it} ;Edit scrollback saves
  393.  {:alg}  {edit %_set} {edit %_hom%cs-mac%ver.cfg}{retu} ;Edit Config files
  394.  {:af1}  {exec-d %z_prog t -8g}                  {retu} ;DSZ terminal shell
  395.  {:cf5}  {:cky}  {exec-d %utildir%\dfr.com}      {retu} ;Directory Freedom
  396.  {:nf3}  {setv file,%dldir%\}                           ;External List Pgm
  397.          {inpu file,File to List}        {goto list_it}
  398.  {:nf5}  {setv file,%dldir%\}                           ;External Editor Pgm
  399.          {inpu file,File to Edit}          {goto ed_it}
  400.  {:nf6}  {setv file}                                    ;Dial Phone for voice
  401.          {inpu file,Name or Number to Call}
  402.          {comp file}  {ifco retu}
  403.          {comp ext_di}                                  ;if %ext_di <> NUL
  404.          {ifco ,enf6}                                   ; use external dialer.
  405.          {call search} {comp addr} {ifco retu}          ;Use internal routine
  406.          {inpu addr,Press Space after dial}             ;display match,
  407.          {subs addr,32,14,%addr}                        ;phone# in cols 32-45
  408.          {spdc n}
  409.          {send ATM1DT%addr^m}
  410.          {setl 30,retu,, }
  411.          {look  }
  412.          {paus 1}
  413.          {spdc y} {retu}                                ;end internal pgm
  414.  {:enf6} {exec-n %ext_di %file}   {retu}                ; -or- use external pgm
  415.  {:nf4}  {:shel}      {shel}                            ;Shell To DOS
  416.          {subs dr,1,1,%_hom}                            ;Now, return to Commo
  417.          {exec-n %dr:}                                  ; home directory
  418.          {leng %_hom}{setv len,%_len}
  419.          {decr len}
  420.          {subs hom,1,%len,%_hom}
  421.          {exec-n cd %hom}
  422.          {setv dr}    {setv len}    {setv hom}
  423.          {retu}
  424.  {:alj}  {exec-w15 mjog /l}                      {retu} ;Mjog
  425.  {:als}  {exec-w15 set}                          {retu} ;See DOS Environment
  426.  {:al<}  {setv file} {inpu file,See What Variable?}     ;See a Commo variable
  427.          {comp file} {ifco retu}
  428.          {setv-s value,%file}
  429.          {inpu %%file,Variable %file,%value} {retu}
  430.  {:al.}  {setv inpu} {inpu inpu,Variable,Setting}       ;Set a Commo variable
  431.          {comp inpu} {ifco retu}
  432.          {setv %%inpu}    {retu}
  433.  {:al/}  {:loop_1}                                      ;Load another macro file
  434.          {setv parm} {setv file}                        ;initialize variables
  435.          {inpu file,Load a Macro}
  436.          {comp file} {ifco retu}
  437.          {inst file,,}                                  ;Comma used to delimit
  438.          {ifco-c g_pm}                                  ; start_label from macro
  439.          {inst file,.}                                  ;You may omit ".mac"
  440.          {ifco ,mac_test}                               ; extension
  441.          {setv pos,%_pos} {decr pos}
  442.          {subs file,1,%pos,%file}
  443.  {:mac_test}
  444.          {ifex %_hom%%file.mac,,loop_1}                 ;loop on no-exist
  445.          {macl %file.mac%parm}                          ;load new macro
  446.  {:g_pm} {subs parm,%_pos,255,%file}
  447.          {setv pos,%_pos} {decr pos}
  448.          {subs file,1,%pos,%file}
  449.          {retu}
  450.  
  451.  {:alb}  {ifca ,backup}                                 ;Dual use Alt-B
  452.          {brea} {retu}                                  ; ONLINE = Break
  453.  {:backup}
  454.          {exec-n %pk_zip -a %savedir\mac %_hom%*.mac}   ;Backup Commo Macros
  455.          {exec-n %pk_zip -a %savedir\mac %_hom%*.fon}   ;Backup Commo FON files
  456.          {exec-n copy %savedir\mac.* %bu_dr}
  457.          {comp xpert,y} {ifco ,retu}                    ;if %xpert=y, backup
  458.           exec-n %pk_zip -a %dldir\estate %dldir\estate %dldir\706  ; personal
  459.           exec-n copy %dldir\estate.z?p %bu_dr                      ; business
  460.          {exec-n %pk_zip -a %savedir\$$ g:\q5\home.*}
  461.          {exec-n copy %savedir\$$.z?p %bu_dr}
  462.          {retu}
  463.  ┌────────────────────────────────────────┐
  464.  │---* Commo Help and quick reference *---│
  465.  └────────────────────────────────────────┘
  466.  {:alk}  {exec-w60 type %_hom%assign.key}        {retu} ;Show Key Assignments
  467.  {:hom}  {setv file,%ins_dir\*.doc}      {goto list_it} ;List Commo DOCS
  468.  {:alh}  {ifca ,hlp} {hang}                      {retu} ;Dual use of Alt-H
  469.  {:hlp}  {help 0}                                {retu} ; Hangup or HELP
  470.  ┌─────────────────────────┐
  471.  │---* Session History *---│
  472.  └─────────────────────────┘
  473.  {:upa}  {screen n,%savedir\savescro} {scro}     {retu} ;Enter  Scrollback
  474.  {:dna}  {setv file,%_cap}                 {goto ed_it} ;Edit   Capture File
  475.  {:lfa}  {setv file,%_cap}               {goto list_it} ;List   Capture File
  476.  {:rta}  {setv file,%savedir\*.cap}      {goto list_it} ;Review Past Capture
  477.  {:gr+}  {screen y,%savedir\commo.scn}           {retu} ;Capture Screen
  478.  {:gr-}  {edit %savedir\commo.scn}               {retu} ;Show Screen Capture
  479.  {:alr}  {setv file,%_uselog}            {goto list_it} ;Review Call Log
  480.  {:end}  {inpu abbr,Which 2-letter ACTION File?}        ;Edit  ACTION File
  481.          {edit %_hom%action.%abbr}               {retu}
  482.  {:al1}  {inpu abbr,Show ->%abbr%<- ACTION}             ;Show ACTION history
  483.          {comp abbr} {ifco retu}
  484.          {subs abbr,1,2,%abbr}
  485.          {setv file,%savedir\*.%abbr}    {goto list_it}
  486.  ┌──────────────────────────────────────────┐
  487.  │---* Directly view specific filenames *---│
  488.  └──────────────────────────────────────────┘
  489.  {:cf9}  {setv file,%savedir\answer1}    {goto list_it} ;View ANSWER1
  490.  {:cf0}  {setv file,%savedir\*.log}      {goto list_it} ;View COASTAL .log files
  491.  ┌──────────────────────────┐
  492.  │---* Messaging macros *---│
  493.  └──────────────────────────┘
  494.  {:sf3}  {exec-n %reader}                        {retu} ;Run Mail Reader Pgm
  495.  {:ala}  {ifca ,a_yn}  {asci %dldir%\,:}         {retu} ;Ascii Upload
  496.  {:alo}  {scre n,%_hom%quote.in}                        ;Capture/Quote Message
  497.          {scro} {edit %_hom%quote.in}
  498.          {ifex %_hom%quote.in,,equote}
  499.          {rope %_hom%quote.in,equote}
  500.  {:nline}{read line} {send ~-> %line%|}
  501.          {goto nline}
  502. {:equote}{send  ~|}  {exec-n del %_hom%quote.in} {retu}
  503.  
  504.  {:cf6}  {inpu bbsid,Note to Edit?}                     ;Edit Notefile
  505.          {edit %savedir\%bbsid%}
  506.          {retu}
  507.  ┌────────────────────┐
  508.  │---* Play Space *---│ {:alp} {macr playsp} {}
  509.  └────────────────────┘
  510.   *  This area is useful for playing with new macro ideas.
  511.   *  It is easily accessed with Alt-P
  512.   *  {disp ,,,Hi %name%!} {}
  513.  
  514.  {:cua}
  515.  
  516.          {inpu file,Name the macro to Record}
  517.          {ifex %_hom%%file,alq}
  518.          {wope %_hom%%file}
  519.          {setg ,,l}
  520.          {sete-p0 end_record}
  521.  
  522.  {:look_loop}
  523.          {look ^m}
  524.          {gets line}
  525.          {writ %line}
  526.          {goto look_loop}
  527.  
  528.  {:end_record}
  529.          {info-q Quit Macro Recording?}
  530.          {ifco ,look_loop}
  531.          {sete}
  532.          {wclo}
  533.          {edit %_hom%%file}
  534.          {retu}
  535.  
  536.          {curs} {}
  537.  
  538.          {setg ,,l}
  539.          {gets-n line}    ;you could fill %line another way
  540.          {call num_filter}
  541.          {disp ,,,^m^jUnfiltered: %line}        ;show variables
  542.          {disp ,,,^m^jFiltered:   %number^m^j}  ;and number
  543.          {retu}
  544.  
  545.  {:num_filter}
  546.          {leng %line}   ;get length of entire string
  547.          {setv count,0}
  548.          {setv number}
  549.  {:num_fil}
  550.          {incr count}
  551.          {subs char,%count,1,%line}
  552.          {comp char,0}  {ifco writ_num}
  553.          {comp char,1}  {ifco writ_num}
  554.          {comp char,2}  {ifco writ_num}
  555.          {comp char,3}  {ifco writ_num}
  556.          {comp char,4}  {ifco writ_num}
  557.          {comp char,5}  {ifco writ_num}
  558.          {comp char,6}  {ifco writ_num}
  559.          {comp char,7}  {ifco writ_num}
  560.          {comp char,8}  {ifco writ_num}
  561.          {comp char,9}  {ifco writ_num}
  562.          {comp count,%_len}
  563.          {ifco retu,num_fil}
  564.  {:writ_num}
  565.          {setv number,%number%%char}
  566.          {comp count,%_len}
  567.          {ifco retu,num_fil}
  568.  
  569.  {:gr*}  {:cla}                                         ;Test Command here
  570.          {disp ,,,This key is used to test any command %_ela^m}
  571.          {disp ,,,%_nam   %_num}
  572.          {retu}
  573.  ┌────────────────────────────────────────┐
  574.  │  Send a Tagline from your Mail Reader  │
  575.  └────────────────────────────────────────┘
  576.  
  577.  {:cnd}  {comp random_t}         ;If # of lines variable is NUL
  578.          {ifco select_t}         ;goto select specific tagline
  579.  
  580.          {setv sec,%_sec}        ;maximum 60 lines
  581.          {divi sec,%random_t}    ;divide a number from 0 to 60
  582.                                  ; by #lines in tagfile.
  583.          {setv rem,%_rem}        ;the remainder is a
  584.          {incr rem}              ;pseudo random # from 1 to %line
  585.          {rope %tagfile,s_tag}
  586.          {setv count,1}
  587.  {:t_loop}
  588.          {read line}             ;read a tagline
  589.          {comp count,%rem}       ;compare current line# with random#
  590.          {ifco-E s_tag}          ;if same, send_tagline
  591.          {incr count}            ;otherwise read next tagline
  592.          {goto t_loop}
  593.  {:s_tag}
  594.          {send %line}            ;send the tagline
  595.          {rclo}                  ;clean up open files
  596.          {setv sec} {setv rem}   ;and variables
  597.          {retu}                  ;END random tagline selection
  598.  
  599.  {:select_t}                     ;START specific tagline selection
  600.          {rclo}                  ;make sure tagfile is closed
  601.          {setv cn}               ;reset the tagline number seletion
  602.          {sete-p0 cnd}           ;make <ESC> empty a "wrong" choice
  603.          {inpu cn,Choose Tagline Nº}
  604.          {comp cn}   {ifco retu} ;if no tag number, end the routine
  605.          {rope %tagfile,cnd}     ;open tagline file
  606.          {setv count,0}          ;initialize counter
  607.  {:t_lp}
  608.          {incr count}            ;increment counter
  609.          {read line}             ;read a tagline
  610.          {comp cn,%count}        ;is this the chosen one?
  611.          {ifco ,t_lp}            ;if not, loop back
  612.  {:p_tag}
  613.          {inpu line,Press Enter to Send} ;or <ESC> to skip & reselect
  614.          {send %line^m}          ;send selected tagline
  615.          {setv line} {setv cn}   ;reset variables
  616.          {retu}                  ;END of sending specific tagline
  617.  
  618.  ┌────────────────────────────────────────────────────────┐
  619.  │  An automatic ASCII message entry system for PCBoards  │
  620.  └────────────────────────────────────────────────────────┘
  621.  
  622.  {:nf8}  {setv file,%dldir%\} {inpu file,Name of Upload Message}
  623.          {ifex %file%,,n_e}
  624.          {parm ,,,,2}  {send e|}  {asci %file%,}
  625.          {parm ,,,,0}  {send ~~|~~~sn|}
  626.          {look %bbs_pmt}
  627.          {disp ,,,^j^j}
  628.          {disp ,18,1E,▌ Erase %file%? [Y/n] ▐^m}
  629.          {setl 5,y_d,,}
  630.          {golo y_d,y}
  631.          {golo n_e,n}
  632.          {look 'N' Skips Message Delete}
  633.  {:y_d}  {exec-n del %file}
  634.  {:n_e}  {send ^h}{disp ,18,,                                 ^m}{}
  635.  
  636.  ┌──────────────────────────────────────────────┐
  637.  │  A guarded Alt-X command when leaving Commo  │
  638.  └──────────────────────────────────────────────┘
  639.  
  640.  {:alx}  {setv xtime,10}                        ;set time-to-exit
  641.          {setv count,0}
  642.          {sete-p0 noex}
  643.          {disp 24,1,74,  EXIT ^(Commo^) at "%xtime" > }
  644.          {disp ,,70,   Are you Sure? (Y/n) }
  645.          {disp 24,26}
  646.          {incr xtime}
  647.          {setv count,0}   {setv resp}           ;initialize variables
  648.  {:xlop} {setg 1,upct,n}  {gets-h %resp,1,q_t}  ;set up 1 second wait
  649.          {comp %resp,n}   {ifco noex}           ;compare response
  650.          {comp %resp,y}   {ifco q_t}            ;if resp = y, goto :q_t
  651.  {:upct} {disp 24,26,71,%count}   {disp 24,26}
  652.          {incr %count}    {comp %count,%xtime}
  653.          {ifco-G q_t,xlop}                      ;loop or :q_t
  654.  {:noex} {disp 24,1,,                                                  ^m}
  655.          {setv xtime}
  656.          {retu}                                 ;decided to stay
  657.  {:q_t}  {exit}                                 ;normal exit from Commo
  658.  
  659.  ┌────────────────────────────────────────┐
  660.  │  A tool to search a file for a string  │
  661.  └────────────────────────────────────────┘
  662.  
  663.  {:cf3}  {inpu file,Name to search from ADDRESS book}
  664.          {comp file}
  665.          {ifco retu}
  666.          {call search}
  667.          {setv oldrow,%_row}       {setv oldcol,%_col}
  668.          {setv row,%_row}          {decr row,2}
  669.          {disp %row,1,07,                                                                                ^j}
  670.          {comp addr}               {ifco retu}
  671.          {disp %row,1,20,%addr }   {disp %oldrow,%oldcol}
  672.          {setv addr} {setv oldcol} {setv row}
  673.          {setv file} {setv oldrow} {retu}
  674.  {:search}
  675.          {rope %savedir\address,retu}
  676.  {:aloop}
  677.          {read addr}
  678.          {inst addr,%file}          {ifco ,aloop}
  679.          {rclo}     {retu}
  680.  
  681.  ┌────────────────────────────────────────────────────┐
  682.  │  Download list tagging using COMMO built-in tools  │
  683.  └────────────────────────────────────────────────────┘
  684.   *   Featuring dual-function   Alt-D   depending on ON/OFF line Status
  685.  
  686.  {:ald}  {ifca mlist}            ;Alt-D first checks for CARRIER
  687.          {dial}{retu}            ;If NO, bring up dialing directory
  688.  
  689.  {:mlist}{scre n,%_hom%dl-list}  ;If CARRIER ONLINE, name screen image
  690.          {scro}                  ;Enter scrollback mode:
  691.   *                              ;  This is where you will tag files
  692.                                  ;  Use the "W" facility in scrollback
  693.   *                              ;  Press C/R twice on each file to tag
  694.   *                              ;  Press ESC to quit tagging.  Next,
  695.          {edit %_hom%dl-list}    ;Enter COMMO's built-in editor:
  696.   *                              ;  Add or delete file names, 1 per line
  697.   *                              ;  Description text will be stripped
  698.   *                              ;  later in the macro.
  699.          {rope %_hom%dl-list}    ;Open just made list
  700.          {read line}             ;Read the first line
  701.          {rclo}                  ;Close the list
  702.          {comp line}             ;Is the first line empty?
  703.          {ifco retu}             ;If so, quit.  Otherwise go on.
  704.          {setv file}
  705.          {inpu file,C/R to Start DownLoad Now}   ;A chance to exit
  706.          {comp file}  {ifco go-dl}      {retu}   ;  before start of d/l.
  707.  
  708.  {:go-dl}{send d|}               ;To the BBS, the download command
  709.   *                              ; (or use the FLAG command)
  710.          {rope %_hom%dl-list,end-dl}     ;Open file list for reading
  711.  {:next-1}
  712.          {read file}             ;Read one complete line into %file%
  713.          {subst file,1,12,%file} ;Strip all but first 12 characters
  714.          {send ~~~%file%|}       ;Send filename to BBS
  715.          {goto next-1}           ;Repeat read unti dl-list is all read
  716.  {:end-dl}
  717.          {exec-n del %_hom%dl-list}      ;Delete the list after sending
  718.          {send ~|}  {retu}       ;This macro is ended.
  719.   *                              ;Waiting for Auto-Zmodem d/l?
  720.  
  721.  ┌─────────────────────────────┐
  722.  │  REP Mark and Dial Routine  │
  723.  └─────────────────────────────┘
  724.   *  This automatic mark-and-dial routine will send your .REP files
  725.   *  It bypasses .QWK download questions with the "SKIP" facility
  726.  
  727.  {:sf4}  {unma}
  728.          {setv m_call,aln}
  729.          {ifex %repdr\*.rep,rep_mark}
  730.          {exec-n del %ramdr\rep_dir}
  731.          {setv skip}
  732.          {goto auto}
  733.  {:rep_mark}
  734.          {exec-n dir %repdr\*.rep > %ramdr\rep_dir}
  735.          {setv skip,y}
  736.          {rope %ramdr\rep_dir,aln}
  737.  {:r_loop}
  738.          {read file}
  739.          {inst file,rep} {ifco ,r_loop}
  740.          {subs file,1,6,%file}
  741.          {mark %file}    {goto r_loop}
  742.  
  743.  ┌────────────────────────────────────────┐
  744.  │  Return Point from cs-mac agenda menu  │
  745.  └────────────────────────────────────────┘
  746.  
  747.  {:do_agenda}
  748.          {setv mt}
  749.          {comp hold}     {ifco retu}
  750.          {hold %hold}    {clea}
  751.          {goto aln}
  752.  
  753.  ┌───────────────────────────────┐
  754.  │  Return Point From LOGON.MAC  │
  755.  └───────────────────────────────┘
  756.  
  757.  {:aln}   dial-c 45,      goto auto     ;Optional simple Multi-dial & Return
  758.  
  759.  ┌────────────────────────────────────────┐
  760.  │  Dialing Marco for BBS Mailrun Events  │   Adapted From: TIM SAARI
  761.  └────────────────────────────────────────┘
  762.   *  If you enclose the above "(dial-c 45,) (goto auto)" in curly braces
  763.   *  the more complex dialer below will be disabled.
  764.  
  765.          {setv row,%_row}               ;Save current cursor location
  766.          {setv col,%_col}
  767.          {disp 6,10,,                                                               }
  768.          {setv busy,0}                  ;Initialize result counters
  769.          {setv nodt,0}
  770.          {setv voic,0}
  771.          {setv carr,0}
  772.  
  773.  {:redial}
  774.          {disp %row,%col}
  775.          {sete-p0 auto}                 ;Goto autopilot on ESCape
  776.           dial-c 1,,seeya                               ;More complex
  777.          {dial-c 1}                                     ;Less complex
  778.          {comp _dtc,0}                  {ifco auto}     ;no systems marked
  779.          {comp _dtc,3}                  {ifco inccarr}  ;dialer timed out
  780.          {comp _dtc,4}                  {ifco interve}  ;operator intervention
  781.          {comp _dialrt,BUSY}            {ifco incbusy}
  782.          {comp _dialrt,NO DIAL TONE}    {ifco incnodt}
  783.          {comp _dialrt,VOICE}           {ifco incvoic}
  784.  {:incbusy}
  785.          {incr busy}
  786.          {disp 6,32,0B,Busy: %busy}
  787.          {setv dialrt,BUSY}
  788.          {comp busy,45} ;number of redials for a BUSY result code
  789.          {ifco-g ,l_atmpt}
  790.          {unma-l} {setv busy,0}
  791.          {goto l_atmpt}
  792.  {:inccarr}
  793.          {incr carr}
  794.          {disp 6,64,0B,No Ans: %carr}
  795.          {setv dialrt,TIMEOUT}
  796.          {comp carr,5}                  ;unmark on fifth NO ANSWER
  797.          {ifco-g ,l_atmpt}
  798.          {unma-l} {setv carr,0}
  799.          {goto l_atmpt}
  800.  {:incnodt}
  801.          {incr nodt}
  802.          {disp 6,52,0B,No Tone: %nodt}
  803.          {comp nodt,9}  ;number of redials for a NO DIAL TONE result code
  804.          {setv dialrt,NO TONE}
  805.          {paus 120}
  806.          {ifco-g auto,l_atmpt}
  807.  {:incvoic}
  808.          {incr voic}
  809.          {disp 6,42,0B,Voice: %voic}
  810.          {setv dialrt,VOICE}
  811.          {comp voic,5}  ;number of redials for a VOICE result code
  812.          {ifco-g ,l_atmpt}
  813.          {unma-l} {setv voic,0}
  814.          {goto l_atmpt}
  815.  {:interve}
  816.          {setv dialrt,OP-INT}
  817.          {goto l_atmpt}
  818.  
  819.  {:l_atmpt}
  820.          {disp 6,23,0A,         }                       ;Clear prior result
  821.          {disp 6,10,0A,Last Attempt: %dialrt }          ;Display last result
  822.          {goto redial}                                  ;Dial again
  823.  
  824.  ┌────────────────────────────────┐
  825.  │  Event Outdial Interupt Macro  │
  826.  └────────────────────────────────┘
  827.  {:seeya}{disp ,,,%_dialrt}
  828.          {loca n}
  829.          {send ata|}
  830.          {loca y}
  831.          {setg ,,l,^M^J}
  832.          {gets constr,40}
  833.          {pause 12}
  834.          {send %constr%^M^J}
  835.          {send You have connected during an attemped mail run.^M^J}
  836.          {send Please try again later.  See ya.^M^J}
  837.          {pause 9}
  838.          {hang y}
  839.          {look carrier}
  840.          {loca n}{retu}
  841.  
  842.  ┌─────────────┐
  843.  │  Autopilot  │
  844.  └─────────────┘
  845.   *  This routine is intended to be always running.
  846.   *  It is active only when the internal variable %auto% = y
  847.   *  If active, can be started with Alt-C or Alt-N (and stopped with "P").
  848.   *  If inactive, can be started with Alt-T or Alt-A.
  849.   *  It can start any event at a specified time of the day.
  850.   *  It can run a different event on a particular day of the week.
  851.   *  While running, :auto logs rings of the phone to a log.
  852.   *  Enters an auto-answer mode if it receives a single ring.
  853.   *    Exits auto-answer mode after 35 seconds of inactivity.
  854.   *
  855.   *  You need to edit the autopilot to setup events and event timing.
  856.  
  857.  ┌──────────────────────────────────────┐
  858.  │  Autopilot converted to Simple Host  │
  859.  └──────────────────────────────────────┘
  860.   *  The core of the autopilot routine is later on.  This subroutine will
  861.   *  answer the phone on a pattern of  "RING; wait 10-45 seconds; RING RING"
  862.   *  You need a file called PASSWORD in your Commo home directory.
  863.   *  The first line of the PASSWORD file is the HOST access protection.
  864.  
  865.  {:ans}  {disp 25,1,17,░░░░   ^(Commo^) Autopilot          }
  866.          {disp 25,34,1e,Waiting for 2 RINGs          }
  867.          {disp 25,63,17,%_12h%:%_min%.%_sec %_amp%   ░░░░}
  868.          {setl 35,auto}                         ;35 seconds in callwait mode
  869.          {setv set,y}                           ;flag indicates callwait set
  870.          {look ring}
  871.          {disp 25,34,1f,Waiting for 1 RING  }
  872.          {look ring}
  873.          {send ~ATA~|}
  874.          {disp 25,34,1b,Waiting for CONNECT }
  875.          {look CONNECT}
  876.          {disp 25,34,1c,Waiting for Password}
  877.          {disp %row,%col}
  878.          {spdc y}
  879.          {send ~~Hello^j^j|Enter Password: }
  880.          {paus 1}
  881.          {setg 15,gbye,n}
  882.          {gets-p pass,8,gbye}
  883.          {ifex %_hom%password,,gbye}            ;quit if password file=NUL
  884.          {rope %_hom%password}
  885.          {read password}
  886.          {rclo}
  887.          {comp pass,%password}
  888.          {ifco ,gbye}
  889.          {setv pass}
  890.          {setv password}
  891.          {ifca ,shel}                           ;for local HOST testing
  892.          {exec %utildir\doorway com%_por /m:60 /g:on /a:on /v:d^u /o:t /s:* /c:dos}
  893.          {paus 2}
  894.          {send ~~~~^m^jSee you later %name%^m^j~~}
  895.  {:gbye} {hang y}
  896.          {paus 5}
  897.          {goto auto}                            ;return to Autopilot
  898.  
  899.  ┌────────────────────────────────┐
  900.  │  RingLog portion of Autopilot  │
  901.  └────────────────────────────────┘
  902.   *  Sort of an expensive answering machine enhancement.
  903.   *  This section of Autopilot logs telephone rings to a save file.
  904.   *  With an {auto r_log,^m^jRING^m^j} {}, you will log RING out of Autopilot
  905.  
  906.  {:r_log}{exec-N echo Your Phone rang: %_dat at %_24h%:%_min%:%_sec% >> %savedir\ring.log}
  907.          {comp auto} {ifco retu}
  908.          {comp ring} {ifco no_new}
  909.          {incr ring}
  910.          {incr ring_c}
  911.  {:nlop} {setl 10,ilop}          ;After 10 seconds, return to outer loop
  912.          {golo r_log,RING}
  913.          {look Inside r_log now}
  914.  
  915.  ┌─────────────────────────────────────────┐
  916.  │  Set Autopilot Keyboard responses here  │
  917.  └─────────────────────────────────────────┘
  918.   *  Autopilot can respond to hot-key strokes from the keyboard.
  919.  
  920.  {:ialq} {call e_auto} {call alq}  {goto auto}  ;Edit menu on  "Q"
  921.  {:ialh} {call e_auto} {call hom}  {goto auto}  ;Commo Help on "H"
  922.  {:ialm} {call e_auto} {call alm}  {goto auto}  ;Macro edit on "M"
  923.  {:iald} {call e_auto} {call ald}  {goto auto}  ;Dialer on     "D"
  924.  {:ialf} {call e_auto} {call alf}  {goto auto}  ;Filelist on   "F"
  925.  {:ials} {call e_auto} {call nf4}  {goto auto}  ;Shell to DOS  "S"
  926.  {:ialp} {call e_auto}             {goto a_yn}  ;Autopilot OFF "P"
  927.  {:ialx} {call e_auto} {call alx}  {goto auto}  ;Exit Commo on "X"
  928.  {:ialk} {scro}        {goto ilop}              ;Scrollback on "K"
  929.  
  930.  {:ialu} {call e_auto} {call alr}  {goto auto}  ;Review Uselog "U"
  931.  {:ialb} {call e_auto} {call alb}  {goto auto}  ;Backup on     "B"
  932.  {:ialt} {call e_auto} {call nf6}  {goto auto}  ;Phone Talk on "T"
  933.  
  934.  {:iall} {keys 76e0,51e0,4fe0}                  ;Ringlog on    "L"
  935.          {edit %savedir\ring.log}  {goto ilop}
  936.  
  937.  {:e_auto}                                      ;End Autopilot subroutine
  938.          {spdc y}                               ;Restore Serial Port Display
  939.          {stat y}                               ;Restore status line
  940.          {setv ring_c}                          ;Reset ring counter
  941.          {setv time}
  942.          {disp %row,%col}       {retu}          ;Restore cursor location
  943.  
  944.  ┌──────────────────────────┐
  945.  │  Autopilot Core Routine  │
  946.  └──────────────────────────┘
  947.   *  This is the core of the autopilot routine.
  948.   *  Near the end of the core you will see the setting of event times as
  949.   *  well as the event definitions.
  950.  
  951.          {exec time}             ;start here to test your event additions
  952.  {:auto} {pops-c}                ;clear the return stack
  953.          {setv m_call,aln}
  954.          {comp auto,y}           ;CS-MAC starts Autopilot here
  955.          {ifco ,retu}
  956.          {ifca retu}             ;don't run autopilot when ONLINE
  957.          {sete-p0 e_auto}
  958.          {setv row,%_row}
  959.          {setv col,%_col}
  960.          {setv ring_c,0}
  961.          {stat n}
  962.          {spdc n}
  963.          {disp 25,1,4f,░░░░   ^(Commo^) Autopilot          }
  964.          {disp 25,34,4e,ESCape quits                 }
  965.  
  966.  {:ilop} {comp shh,y}   {ifco ,sho_t}
  967.          {disp 25,63,4f,              ░░░░}
  968.          {goto q_ti}
  969.  {:sho_t}{disp 25,63,4f,%_12h%:%_min%.%_sec %_amp%   ░░░░}
  970.  {:q_ti} {comp pmail}   {ifco no_p}      {disp 25,76,4d,P}
  971.  {:no_p} {comp set}     {ifco nostar}    {disp 25,75,4c,*}
  972.  {:nostar}
  973.          {comp ring,1}  {ifco-l noring}
  974.          {disp 25,56,47,Rings} {disp 25,53,4b,%ring}
  975.  {:noring}
  976.          {disp %row,%col}
  977.          {comp ring_c,1}         {ifco-e ans}   ;Goto simple host on 1 ring
  978.          {setv ring_c,0}
  979.          {setl 10,ilop}          ;lookfor . . . indefinitely
  980.          {setv time,%_24h%:%_min}
  981.  
  982.  ┌───────────────────────────────────┐
  983.  │  Set Autopilot Event timing here  │
  984.  └───────────────────────────────────┘
  985.   *  This area is used to establish the time at which an autopilot event
  986.   *  will be run.  The event definitions are in the next section.
  987.  
  988. !    All required CS-COMMO.MAC editing is BELOW this line.
  989.  
  990. !        {comp time,17:30} {ifco ev_1}          ;Event 1 time here
  991. !        {comp time,06:00} {ifco ev_2}          ;Event 2 time here
  992. !        {comp time,23:59} {ifco ev_3}          ;Event 3 time here
  993. !        {comp time,01:11} {ifco ev_4}          ;Event 4 time here
  994.  
  995. !        {golo r_log,RING}       ;log "RING"
  996.                                  ; (use your particular modem string)
  997.  
  998.          {golo iall,l}           ;List RING.LOG on     "L"
  999.          {golo ialq,q}           ;Editor menu on       "Q"
  1000.          {golo ialh,h}           ;Commo Help on        "H"
  1001.  
  1002.          {golo ialm,m}           ;Macro editor on      "M"
  1003.          {golo iald,d}           ;Dialing directory on "D"
  1004.          {golo ialf,f}           ;Make action file on  "F"
  1005.  
  1006.          {golo ials,s}           ;Drop to DOS on       "S"
  1007.          {golo ialp,p}           ;Autopilot Toggle on  "P"
  1008.          {golo ialx,x}           ;Goto Exit routine on "X"
  1009.  
  1010.          {golo ialk,k}           ;Scrollback on        "K"
  1011.          {golo ialu,u}           ;Review Uselog on     "U"
  1012.          {golo ialb,b}           ;Backup files         "B"
  1013.  
  1014.          {golo ialt,t}           ;Phone Talk on        "T"
  1015.          (golo ----,-)           ;(1) left.  May use
  1016.                                  ;"J", "V", "W", "Y", or "Z"
  1017.  
  1018.          {look Something that won't happen}   {goto auto}
  1019.  
  1020.  ┌────────────────────────────────────────┐
  1021.  │  Set Autopilot Event definitions here  │
  1022.  └────────────────────────────────────────┘
  1023.   *  In general, quit the autopilot (call e_auto), call an event subroutine,
  1024.   *   after the subroutine, (goto auto) ... the autopilot routine.
  1025.   *  You can set up many events, you can restrict event execution to certain
  1026.   *   days of the week
  1027.  
  1028.   *  Event_1 goes to label :sfa on Saturdays.  This marks a bunch of BBS
  1029.   *  numbers for a weekend mailrun.  If it isn't Saturday, goto :nfa instead.
  1030.   *  Event_2 happens later in the day.  This is an Internet mailrun.
  1031.   *  Event_3 looks for .REP files and sends them at midnight.
  1032.   *  Event_4 calls a file backup routine at 0111AM
  1033.  
  1034. !{:ev_1} {call e_auto} {comp _dwn,6} {ifco auto,nfa}    ;see mark-and-dial area
  1035. !{:ev_2} {call e_auto} {comp _dwn,6} {ifco sfa,auto}    ;below for these labels
  1036. !{:ev_3} {ifex %repdr\*.rep,,nlop}   {call e_auto} {goto sf4}
  1037. !{:ev_4} {call e_auto} {call alb}    {goto auto}
  1038.  
  1039.  ┌────────────────────────┐     ┌───────────────────────┐
  1040.  │  Links from COMMO.FON  │     │  Generic Logon Alone  │
  1041.  └────────────────────────┘     └───────────────────────┘
  1042.   *  By using these three character linked macro names in your .FON directory
  1043.   *  Commo will be able to logon automatically to each of these BBS types.
  1044.   *  These logons will get you as far as the Main Board Command Prompt
  1045.   *  (No mail fetching will occur).
  1046.   *  COMMO.MAC gets some prompt information from TABLE.MAC then jumps
  1047.   *  to the generic logon routine in LOGON.MAC.
  1048.  
  1049.  {:pcb}  {macl table.mac,pcb}           ;PCBoard v14.5, v15.0
  1050.  {:rma}  {macl table.mac,rma}           ;Remote Access
  1051.  {:tag}  {macl table.mac,tag}           ;T.A.G.
  1052.  {:s-f}  {macl table.mac,s-f}           ;Spitfire
  1053.  {:sfh}  {macl table.mac,sfh}           ;Spitfire, HOTKEY version
  1054.  {:gap}  {macl table.mac,gap}           ;GAP
  1055.  {:wc!}  {macl table.mac,wc!}           ;Wildcat!
  1056.  {:mac}  {macl table.mac,mac}           ;MacroBBS
  1057.  {:max}  {macl table.mac,max}           ;Maximus BBS
  1058.  {:maj}  {macl table.mac,maj}           ;Major BBS
  1059.  {:vir}  {macl table.mac,vir}           ;Virtual BBS
  1060.  {:exc}  {macl table.mac,exc}           ;EXEC-PC BBS
  1061.  
  1062.  ┌───────────────────────────────────────────────┐
  1063.  │  .FON -> COMMO.MAC -> TABLE.MAC -> LOGON.MAC  │
  1064.  └───────────────────────────────────────────────┘
  1065.   *  :qwk is the standard mailrun link to have in your .FON directory.
  1066.  
  1067.  {:qwk}  {macl table.mac,qwk}           ;fetch BBS particulars
  1068.  
  1069.  ┌──────────────────────────┐
  1070.  │  Mark and Dial routines  │
  1071.  └──────────────────────────┘
  1072.   *  These are quite specific to a COMMO.FON dialing directory.
  1073.   *  That's why you need to edit this area.
  1074.   *  Note the use of %m_call% to control dialing sequence.  This is required
  1075.   *  because linked dialing macros jump to TABLE.MAC then to LOGON.MAC.
  1076.   *  LOGON.MAC returns to position ":%m_call" in this file (CS-COMMO.MAC).
  1077.  
  1078.   *  If you run on Autopilot, you will probably be calling some of these
  1079.   *  "mark and dial" routines.
  1080. !    If you don't run Autopilot, all editing is below this line
  1081.  
  1082. !{:nfb}  {unma}   {mark de2,de3}         {goto aln}
  1083. !{:nf7}  {unma}   {mark Weather}         {goto aln}
  1084. !{:nfa}  {mark weather}
  1085. !        {setv m_call,001}
  1086. !        {setv skip                      {goto aln}
  1087. !{:001}  {mark de2,de3}
  1088. !        {setv skip}  {setv m_call,aln}  {goto aln}
  1089. !{:cfa}  {unma}    {mark ledge,datawarp} {goto aln}
  1090. !{:sfa}  {mark de2,de3,smvti,direct,dataw,ledge,babb,after5,foxhole,nodez,dock,lisa},weather,wolf's
  1091. !        {disp 6,21,1f,║   Weekend!  Dial All ■ marked BBS's    ║}
  1092. !        {setv skip}  {setv m_call,aln}  {goto aln}
  1093. !{:sf1}  {unma}   {mark Node4}           {dial 15}             {}
  1094. !{:sf2}  {unma}   {mark Director}        {dial 15}             {}
  1095. !{:wtr}  {macl weather.mac,wtr}
  1096.  
  1097.  ┌────────────────────────────────────────┐
  1098.  │  Mail Run Link from .FON to TABLE.MAC  │
  1099.  └────────────────────────────────────────┘
  1100.   *  With this tool you can mark multiple nodes of one BBS but make only one
  1101.   *  connect per BBS.  After connecting, the macro unmarks nodes named here.
  1102.   *  After unmarking .FON entries, goto :qwk for routine logon and mail process.
  1103.  
  1104. !{:nlb}  {unma de2,de3} {goto qwk}      ;manipulate .FON
  1105.