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

  1.  
  2.  ┌────────────────────────────────┐
  3.  │  Chuck Seyboldt's COMMO Macro  │   CS-MAC08:CS-MAC.MAC
  4.  └────────────────────────────────┘
  5.   *
  6.   *  You will need to  *> !EDIT! <*  Only One (1) of these .MAC files
  7.   *                       ^^^^^^
  8.   *  The file you are reading does  *NOT*  require editing.
  9.   *
  10. ***  You  *must*  edit your COMMO.FON to automate mail and file fetching.
  11.   *  To do so automatically, Press Alt-M and choose "Add a new BBSID".
  12.   *
  13. *───────────────────────────────────────────────────────────────────────────────
  14.  
  15.  {:retu}       {retu}                           ;very handy labelname
  16.  
  17.  ┌─────────────────────────────────────────────────┐
  18.  │  Menu driven addition of new BBSs to COMMO.FON  │
  19.  └─────────────────────────────────────────────────┘
  20.  
  21.  {:new_bbsid}                                   ;Alt-M from COMMO.MAC
  22.          {sete-p0 clea}
  23.          {setv temp}
  24.          {setv bbsid}
  25.          {setv doorno}
  26.          {setv bbsware}
  27.          {setv mailware}
  28.          {inpu temp,Search %_fon for what BBS?}
  29.          {comp temp}    {ifco clea}
  30.          {rope %_hom%%_fon,pick_1}
  31.          {setv count,1}
  32.          {clea}
  33.  {:id_loop}
  34.          {disp %count,1,87,Searching ...}
  35.          {read line}
  36.          {inst line,%temp}
  37.          {ifco ,id_loop}
  38.          {subs line,1,50,%line}
  39.          {disp %count,1,0e,%count.  }
  40.          {disp %count,4,07,%line}
  41.          {incr count}
  42.          {goto id_loop}
  43.  
  44.  {:pick_1}
  45.          {disp %count,1,07,             }
  46.          {inpu cntr,Which Number?  [PgUp] sees behind box}
  47.          {comp cntr}     {ifco new_bbsid}
  48.          {comp cntr,%count}
  49.          {ifco-ge pick_1}
  50.          {comp cntr,0}   {ifco pick_1}
  51.          {setv count,1}
  52.          {clea}
  53.          {disp 1,1,07,Scanning for "%temp%" Selection #: %cntr}
  54.          {rope %_hom%%_fon,clect_bbs}
  55.  {:next_b}
  56.          {read line}
  57.          {inst line,%temp}
  58.          {ifco ,next_b}
  59.          {comp cntr,%count}
  60.          {ifco this_b}
  61.          {incr count}
  62.          {goto next_b}
  63.  {:this_b}
  64.          {subs line,1,80,%line}
  65.          {disp 1,1,07,%line}
  66.          {rclo}
  67.  
  68.          {setv cs_col,70}
  69.          {setv bbs_col,20}
  70.          {setv mwa_col,30}
  71.          {setv ope_col,50}
  72.          {setv cfm_col,60}
  73.  
  74.          {disp 4,30,%cs_col,   Welcome to  CS-MAC  }
  75.          {disp 5,30,%cs_col,   Welcome to  CS-MAC  }
  76.          {disp 6,30,%cs_col,   Welcome to  CS-MAC  }
  77.          {disp 7,30,%cs_col,   Welcome to  CS-MAC  }
  78.          {disp 8,30,%cs_col,   Welcome to  CS-MAC  }
  79.  
  80.          {inpu bbsid,What is the BBSID for this Board?}
  81.          {comp bbsid}   {ifco clea}
  82.  
  83.          {disp 16,20,%bbs_col,   pcb  =  PCBoard       │ maj = MajorBBS  }
  84.          {disp 17,20,%bbs_col,   s-f  =  Spitfire      │ vir = Virtual   }
  85.          {disp 18,20,%bbs_col,   wc!  =  Wildcat!      │ exc = EXEC-PC   }
  86.          {disp 19,20,%bbs_col,   gap  =  GAP           │                 }
  87.          {disp 20,20,%bbs_col,   rma  =  Remote Access │                 }
  88.          {disp 21,20,%bbs_col,   tag  =  T.A.G.        │                 }
  89.          {disp 22,20,%bbs_col,   mac  =  MACRObbs      │                 }
  90.          {disp 23,20,%bbs_col,   max  =  MAXIMUS-CBCS  │                 }
  91.  
  92.          {sete-p0 g_0}
  93.  {:g_0}  {inpu bbsware,Choose BBSware for %bbsid from the list below}
  94.          {comp bbsware,pcb} {ifco g_1}
  95.          {comp bbsware,s-f} {ifco g_1}
  96.          {comp bbsware,wc!} {ifco g_1}
  97.          {comp bbsware,gap} {ifco g_1}
  98.          {comp bbsware,rma} {ifco g_1}
  99.          {comp bbsware,tag} {ifco g_1}
  100.          {comp bbsware,mac} {ifco g_1}
  101.          {comp bbsware,max} {ifco g_1}
  102.          {comp bbsware,maj} {ifco g_1}
  103.          {comp bbsware,vir} {ifco g_1}
  104.          {comp bbsware,exc} {ifco g_1}
  105.          {goto g_0}
  106.  
  107.  {:g_1}  {sete-p0 g_1}
  108.          {disp 16,20,%mwa_col,   mm2  =  MarkMail  │  Virtual   =  vbq   }
  109.          {disp 17,20,%mwa_col,   coq  =  Charlie's │  EXEC-PC   =  exq   }
  110.          {disp 18,20,%mwa_col,   qm4  =  Qmail 4   │  Major     =  mmj   }
  111.          {disp 19,20,%mwa_col,   jmr  =  Jimmer    │  Qmail2    =  qm2   }
  112.          {disp 20,20,%mwa_col,   jet  =  JetMail   │  PCBoard 15=  p15   }
  113.          {disp 21,20,%mwa_col,   roz  =  ROSEmail  │  Silver Xpr=  slx   }
  114.          {disp 22,20,%mwa_col,   dcq  =  DCQwk     │  ZIPNews   =  zns   }
  115.          {disp 23,20,%mwa_col,   mkq  =  MKQwk     │  Cam-Mail  =  cam   }
  116.  
  117.          {inpu mailware,Choose MAILware for %bbsid from the list below}
  118.          {comp mailware,mm2} {ifco g_2}
  119.          {comp mailware,coq} {ifco g_2}
  120.          {comp mailware,qm2} {ifco g_2}
  121.          {comp mailware,qm4} {ifco g_2}
  122.          {comp mailware,jmr} {ifco g_2}
  123.          {comp mailware,jet} {ifco g_2}
  124.          {comp mailware,roz} {ifco g_2}
  125.          {comp mailware,dcq} {ifco g_2}
  126.          {comp mailware,mkq} {ifco g_2}
  127.          {comp mailware,slx} {ifco g_2}
  128.          {comp mailware,zns} {ifco g_2}
  129.          {comp mailware,p15} {ifco g_2}
  130.          {comp mailware,mmj} {ifco g_2}
  131.          {comp mailware,vbq} {ifco g_2}
  132.          {comp mailware,cam} {ifco g_2}
  133.          {comp mailware,exq} {ifco g_2}
  134.          {goto g_1}
  135.  
  136.  {:g_2}  {sete-p0 g_2}
  137.          {disp 16,28,%ope_col,   Some examples of DOOR   }
  138.          {disp 17,28,%ope_col,   commands to help you:   }
  139.          {disp 18,28,%ope_col,                           }
  140.          {disp 19,28,%ope_col,       open markmail^|      }
  141.          {disp 20,28,%ope_col,                           }
  142.          {disp 21,28,%ope_col,       s^|~~~~~~~~~~f^|      }
  143.          {disp 22,28,%ope_col,                           }
  144.          {disp 23,28,%ope_col,       /Q^|                 }
  145.  
  146.          {inpu dorno,Enter the BBS Command to enter the Maildoor}
  147.  
  148.          {sete-p0 new_bbsid}
  149.          {subs abbr,1,2,%bbsid}
  150.  
  151.          {disp 4,30,%cfm_col,                       }
  152.          {disp 5,30,%cfm_col,                       }
  153.          {disp 6,30,%cfm_col,                       }
  154.          {disp 7,30,%cfm_col,                       }
  155.          {disp 8,30,%cfm_col,                       }
  156.  
  157.          {disp 4,30,%cfm_col,    LINK = ^(:qwk^)}
  158.          {disp 5,30,%cfm_col,    ABBR = %abbr}
  159.          {disp 6,30,%cfm_col,    BBSID = %bbsid}
  160.          {disp 7,30,%cfm_col,    BBSware = %bbsware}
  161.          {disp 8,30,%cfm_col,    MAILware = %mailware}
  162.  
  163.          {setv ok}
  164.          {sete-p0 clea}
  165.          {inpu ok,Enter YES to write COMMOFON.NEW}
  166.          {inst ok,n}     {ifco clea}
  167.          {comp ok,yes}   {ifco ,new_bbsid}
  168.          {disp ,,,^mCOMMOFON.NEW can be your new dialing directory.^j}
  169.          {disp ,,,^mYou need to EXIT Commo and rename COMMOFON.NEW to COMMO.FON^j}
  170.          {disp ,,,^mfor these additions to take effect.^j^j}
  171.          {paus 10}
  172. *
  173. *    ┌───────────────────────────────────────────────────────────────────┐
  174. *    │  Example of the data to be appended to an entry in COMMOFON.NEW;  │
  175. *    │                                                                   │
  176. *    │  (bbsid,escape) (abbr,es) (dorno,mmail|) (mail,mm2) (bbs,pcb)     │
  177. *    └───────────────────────────────────────────────────────────────────┘
  178.  
  179.          {ifex %_hom%commofon.new,freshen}
  180.          {exec-n copy %_hom%%_fon %_hom%commofon.bak}
  181.          {goto rope}
  182.  {:freshen}
  183.          {exec-n copy %_hom%commofon.new %_hom%commofon.bak}
  184.  {:rope} {rope %_hom%commofon.bak,clea}
  185.          {wope %_hom%commofon.new}
  186.          {setv count,1}
  187.  {:add_fon}
  188.          {read line}
  189.          {inst line,%temp}
  190.          {ifco ,add_line}
  191.          {comp cntr,%count}
  192.          {ifco append}
  193.          {incr count}
  194.  {:add_line}
  195.          {writ %line}
  196.          {goto add_fon}
  197.  {:append}
  198.          {inst line,^)}
  199.          {subs p1,1,%_pos,%line} {setv pos,%_pos} {incr pos,2}
  200.          {subs p2,%pos,255,%line}
  201.          {inst p2,^)}            {setv pos,%_pos} {incr pos,2}
  202.          {subs p3,%pos,255,%p2}
  203.          {subs p2,1,%_pos,%p2}
  204.          {inst p3,^)}            {setv pos,%_pos} {incr pos,2}
  205.          {subs p4,%pos,255,%p3}
  206.          {subs p3,1,%_pos,%p3}
  207.          {inst p3,^(}
  208.          {subs p3,1,%_pos,%p3}
  209.          {setv p3,%p3%qwk^)}
  210.          {inst p4,^(}            {ifco p4_ok}
  211.          {setv p4,^(^)}
  212.  {:p4_ok}
  213.          {setv line,%p1 %p2 %p3 %p4 ^(bbsid,%bbsid^) ^(abbr,%abbr^) ^(dorno,%dorno^) ^(mail,%mailware^) ^(bbs,%bbsware^)}
  214.          {writ %line}
  215.          {incr count}
  216.          {goto add_fon}
  217.  
  218.  {:clea} {setv line}
  219.          {setv p1}
  220.          {setv p2}
  221.          {setv p3}
  222.          {setv p4}
  223.          {setv ok}
  224.          {setv abbr}
  225.          {setv cntr}
  226.          {setv mailware}
  227.          {setv bbsware}
  228.          {setv cs_col}
  229.          {setv bbs_col}
  230.          {setv mwa_col}
  231.          {setv ope_col}
  232.          {setv cfm_col}
  233.          {clea}
  234.          {exec-n del %_hom%commofon.bak}
  235.          {macl %_mac,auto}                      ;return control to COMMO.MAC
  236.  
  237.  ┌────────────────────────────────────────────┐
  238.  │  Edit COMMO.MAC with your external editor  │
  239.  └────────────────────────────────────────────┘
  240.  * The short macro below uses an external editor to edit COMMO.MAC.
  241.  * It is called from COMMO.MAC ... putting CS-MAC in Commo's memory while
  242.  *      you are editing COMMO.MAC.
  243.  * The revised COMMO.MAC is active after you close your editor.
  244.  
  245.  {:ed_cmac}
  246.          {setv file,%_hom%%_mac}
  247.          {goto ed_it}
  248.  
  249.  {:ed_it}{comp ext_ed}
  250.          {ifco in_ed}
  251.          {exec-n %ext_ed %file}          {goto auto}
  252.  {:in_ed}{inst file,*}                   {ifco auto}
  253.          {inst file,?}                   {ifco auto}
  254.          {edit %file}                    {goto auto}
  255.  
  256.  {:auto} {macl %_mac,auto}
  257.  
  258.  ┌────────────────────────────┐
  259.  │  Menu Driver for Sessions  │
  260.  └────────────────────────────┘
  261.  * This menu driver features the use of :parse to draw and fill
  262.  * boxes.  It also contains :box_draw and :box_fill routines.
  263.  
  264.  {:s_menu}
  265.          {setv row,%_row}
  266.          {setv col,%_col}
  267.          {sete-p0 mnu_x}
  268.          {setv mt}                      ;reset flags
  269.          {setv hold}
  270.          {setv count,0}                 ;initialize various
  271.          {setv pcount,0}                ;initialize :parse
  272.          {setv c_mtit,70}               ;set menu title color
  273.          {setv c_mbox,1f}               ;set menu box color
  274.          {setv c_menu,17}               ;set menu color
  275.          {setv c_pbox,07}               ;set prompt box color
  276.          {setv c_pmpt,0e}               ;set menu prompt color
  277.          {setv c_sbar,30}               ;set summary bar color
  278.          {setv c_bbs,0e}                ;set bbslist color
  279.  
  280.          {disp 3,23,%c_mtit,┌────────────────────────────────────┐}
  281.          {disp 4,23,%c_mtit,│  Commo Mail & File fetchin' Menus  │}
  282.          {disp 5,23,%c_mtit,└────────────────────────────────────┘}
  283.  
  284.          {setv cmd_str,box_make 6 23 16 60 %c_mbox}
  285.          {call parse}
  286.  
  287.          {setv cmd_str,box_fill 7 24 15 59 %c_menu}
  288.          {call parse}
  289.  
  290.          {disp 8,27,%c_menu,1.  Mark BBSes to dial}
  291.          {disp 9,27,%c_menu,2.  Choose Start Time}
  292.          {disp 10,27,%c_menu,3.  Make File transfer agenda}
  293.          {disp 11,27,%c_menu,4.  }
  294.          {disp 12,27,%c_menu,5.  }
  295.          {disp 13,27,%c_menu,6.  }
  296.          {disp 14,27,%c_menu,7.  }
  297.  
  298.          {setv cmd_str,box_make 17 23 19 60 %c_pbox}
  299.          {call parse}
  300.  
  301.  {:clect}
  302.          {disp 18,24,%c_pmpt,                                    }
  303.          {disp 18,27,%c_pmpt,Your Choice: }
  304.          {disp ,,%c_pmpt,  ^h^h}
  305.  
  306.          {setg 600,mnu_x,l}
  307.          {gets-h cmd,1,mnu_x}
  308.          {comp cmd,1}        {ifco mnu_1}
  309.          {comp cmd,2}        {ifco mnu_2}
  310.          {comp cmd,3}        {ifco mnu_3}
  311.          {comp cmd,4}        {ifco mnu_4}
  312.          {goto clect}
  313.  
  314.  {:mnu_1}
  315.          {disp 18,24,%c_pmpt,                                    }
  316.          {disp 18,27,%c_pmpt,BBS Name to Mark: }
  317.          {gets cmd,8,clect}
  318.          {leng %cmd}
  319.          {comp _len,3}
  320.          {ifco-L mnu_1}
  321.          {rope %_hom%%_fon,mnu_1}
  322.  {:gto_loop}
  323.          {read line}
  324.          {inst line,%cmd}
  325.          {ifco ,gto_loop}
  326.          {rclo}
  327.          {mark %cmd}
  328.          {incr count}
  329.          {disp %count,1,%c_bbs,Marked: %cmd}
  330.          {disp 24,1,%c_sbar,  CS-MAC Agenda Summary Bar                                                     }
  331.          {disp 24,34,%c_sbar,%count BBSes Marked}
  332.          {goto mnu_1}
  333.  
  334.  {:mnu_2}
  335.          {disp 18,24,%c_pmpt,                                    }
  336.          {disp 18,27,%c_pmpt,Start Dial Time (hh:mm): }
  337.          {gets hold,5,clect}
  338.          {leng %hold}
  339.          {comp _len,5}
  340.          {ifco-E ,mnu_2}
  341.          {subs test,3,1,%hold}
  342.          {comp test,:}
  343.          {ifco ,mnu_2}
  344.          {disp 24,56,%c_sbar,Holding Until %hold^m}
  345.          {setv mt,n}
  346.          {goto clect}
  347.  
  348.  {:mnu_3}
  349.          {setv mt,n}
  350.          {macl action.mac,alf}
  351.  
  352.  {:mnu_4}
  353.           your menu additions go here
  354.          {goto clect}
  355.  
  356.  {:mnu_x}
  357.          {setv cmd_str,box_fill 3 23 19 60 00}
  358.          {call parse}
  359.          {disp %row,%col}
  360.  {:esc}  {comp count}    {ifco no_bar}
  361.          {comp count,0}  {ifco no_bar}
  362.          {disp 24,1,%c_sbar,  CS-MAC Agenda Summary Bar                                                     }
  363.          {disp 24,31,%c_sbar,%count BBSes Marked^m}
  364.          {comp hold}     {ifco no_bar}
  365.          {disp 24,56,%c_sbar,Holding Until %hold^m}
  366.  
  367.  {:no_bar}
  368.          {setv count}
  369.          {setv c_mtit}
  370.          {setv c_mbox}
  371.          {setv c_menu}
  372.          {setv c_pbox}
  373.          {setv c_pmpt}
  374.          {setv c_sbar}
  375.          {setv c_bbs}
  376.          {macl %_mac%,do_agenda}
  377.  
  378.  ┌─────────────────────────┐
  379.  │  Routine to draw a box  │
  380.  └─────────────────────────┘
  381.   * Thanks to Jim Rahfeldt for speeding these routines to draw entire lines.
  382.   *
  383.   * This routine takes five arguments:  start_row = %arg1
  384.   *                                     start_col = %arg2
  385.   *                                     end_row   = %arg3
  386.   *                                     end_col   = %arg4
  387.   *                                     box_color = %arg5
  388.  
  389.  {:box_make}
  390.          {setv dlen,%arg4}              ;preserve ending column value
  391.          {decr dlen} {decr dlen,%arg2}  ;compute dlen = line length - 2
  392.          {subs dashes,1,%dlen,──────────────────────────────────────────────────────────────────────────────}
  393.          {disp %arg1,%arg2,%arg5,┌%dashes┐}
  394.  {:bumper}
  395.          {incr arg1}
  396.          {comp arg1,%arg3}
  397.          {ifco bottom}
  398.          {disp %arg1,%arg2,%arg5,│}
  399.          {disp %arg1,%arg4,%arg5,│}
  400.          {goto bumper}
  401.  {:bottom}
  402.          {disp %arg1,%arg2,%arg5,└%dashes┘}
  403.          {setv dlen} {setv dashes}      ;free subroutine variable space
  404.          {setv arg0}
  405.          {setv arg1}
  406.          {setv arg2}
  407.          {setv arg3}
  408.          {setv arg4}
  409.          {setv arg5}
  410.          {retu}
  411.  
  412.  ┌─────────────────────────┐
  413.  │  Routine to fill a box  │
  414.  └─────────────────────────┘
  415.   * This routine takes five arguments:  start_row = %arg1
  416.   *                                     start_col = %arg2
  417.   *                                     end_row   = %arg3
  418.   *                                     end_col   = %arg4
  419.   *                                     fill_color= %arg5
  420.  
  421.  {:box_fill}
  422.          {incr arg4} {decr arg4,%arg2}  ;compute actual line length
  423.          {subs filler,1,%arg4,                                                                              }
  424.  {:boxer}
  425.          {disp %arg1,%arg2,%arg5,%filler}
  426.          {incr %arg1}
  427.          {comp arg1,%arg3}
  428.          {ifco-LE boxer}
  429.          {setv filler}                  ;free subroutine variable space
  430.          {setv arg0}
  431.          {setv arg1}
  432.          {setv arg2}
  433.          {setv arg3}
  434.          {setv arg4}
  435.          {setv arg5}
  436.          {retu}
  437.  
  438. ┌─────────────────┐
  439. │  Parse Routine  │
  440. └─────────────────┘
  441.   * This routine parses a %cmd_str% variable into "space delimited"
  442.   * arguments.  %arg0 is the routine to be called after :parse.
  443.   * Subsequent arguments %arg1, %arg2, %arg3, etc.
  444.  
  445.  {:parse}
  446.          {inst %cmd_str%, }
  447.          {ifco ,eparse}
  448.          {setv pos,%_pos}
  449.          {decr pos}
  450.          {subs arg%pcount,1,%pos,%cmd_str}
  451.          {incr pos,2}
  452.          {subs cmd_str,%pos,255,%cmd_str}
  453.          {incr pcount}
  454.          {goto parse}
  455.  {:eparse}
  456.          {setv arg%pcount,%cmd_str}
  457.          {setv cmd_str}
  458.          {setv pcount,0}
  459.          {goto %arg0}
  460.  
  461.  ┌──────────────────────┐
  462.  │  Modem Config Macro  │
  463.  └──────────────────────┘
  464.   *
  465.   *  The general purpose of this macro is to provide initial setup
  466.   *  of a modem.
  467.   *
  468.   *  This macro reads a file called MODEM.DAT
  469.   *
  470.   *  CS-MAC.MAC can send configuration strings to your modem
  471.   *  CS-MAC.MAC can modify COMMO.SET with the modem initialization
  472.   *  string recommended in MODEM.DAT
  473.   *
  474.   *  MODEM.DAT is of this general form:
  475.   *
  476.   *        Modemmake: US Robotics Courier HST
  477.   *        Configure: AT^M~~AT&F^M~~~
  478.   *        Configure: ATX6~&B1~&H1~&R2~S7=60~S11=55^M~~
  479.   *        Configure: AT^M~~AT&W^M
  480.   *        Init'lize: ATZ^M
  481.   *
  482.   *  MODEM.DAT may be made by translating a DATASTORM TECHNOLOGIES, INC.
  483.   *  file called MODEMS.DAT.  The translation is made by the :x_late
  484.   *  routine later in this macro file.
  485.   *
  486.   ***********************************************************************
  487.   *                                                                     *
  488.   * MODEMS.DAT  COPYRIGHT (C) 1991, 1992 DATASTORM TECHNOLOGIES, INC.   *
  489.   *                                                                     *
  490.   * This file is used by PCINSTAL to configure PROCOMM PLUS 2.01 for    *
  491.   * specific modems.  PLEASE DO NOT MODIFY!!  Issue Date:  12/2/92      *
  492.   *                                                                     *
  493.   ***********************************************************************
  494.   *
  495.   *  This COMMO macro is at early stages of development.  Your suggestions
  496.   *  for improvement will be taken seriously.
  497.  
  498.  {:modem}{setv row,%_row}
  499.          {setv col,%_col}
  500.          {call intro}
  501.          {sete-p0 e_modem}
  502.          {ifex %_hom%modem.dat,,no_file}
  503.          {rope %_hom%modem.dat,no_hit}
  504.          {comp oops}  {ifco go_m}
  505.          {disp 9,25,1e,▌ Manufacturer  "%temp%" not found ▐}
  506.  {:go_m} {setv temp}
  507.          {inpu temp,Enter Search criteria here}
  508.          {disp 9,25,07,                                            }
  509.          {comp temp}
  510.          {ifco e_modem}
  511.          {setv count,1}
  512.          {clea}
  513.          {disp 1,55,0e,Searching for: }
  514.          {disp 1,70,0f,%temp}
  515.          {setv col,1}
  516.          {setv row,1}
  517.          {setv ncol,4}
  518.  
  519.  {:next_m}
  520.          {disp %row,%col,87,    Searching ...  }
  521.          {read line}
  522.          {inst line,%temp}
  523.          {ifco label,next_m}
  524.  
  525.  {:label}{inst line,modemmake:}
  526.          {ifco ,next_m}
  527.          {subs 10,12,52,%line}
  528.          {inst 10,%temp}
  529.          {ifco ,next_m}
  530.          {subs line,11,34,%line}
  531.          {disp %row,%col,07,                   }
  532.          {disp %row,%col,0e,%count.    }
  533.          {disp %row,%ncol,07,%line}
  534.          {incr count}
  535.          {setv row,%count}
  536.          {comp count,25}
  537.          {ifco-l next_m}
  538.          {setv col,40}
  539.          {setv ncol,43}
  540.          {decr row,22}
  541.          {goto next_m}
  542.  
  543.  {:no_hit}
  544.          {disp %row,%col,07,                   }
  545.          {comp count,1}
  546.          {ifco-g model_c}
  547.          {setv oops,y}
  548.          {goto modem}
  549.  
  550.  {:model_c}
  551.          {setv cntr}
  552.          {inpu cntr,Which Number?  [PgUp] sees behind box}
  553.          {comp cntr}     {ifco modem}
  554.          {comp cntr,%count}
  555.          {ifco-ge model_c}
  556.          {comp cntr,0}   {ifco model_c}
  557.          {setv count,1}
  558.          {clea}
  559.          {disp 1,1,07,Scanning for "%temp%" Selection #: %cntr}
  560.          {rope %_hom%modem.dat,e_modem}
  561.  
  562.  {:next_n}
  563.          {read line}
  564.          {inst line,%temp}
  565.          {ifco chek,next_n}
  566.  
  567.  {:chek} {inst line,modemmake:}
  568.          {ifco ,next_n}
  569.          {subs 10,12,52,%line}
  570.          {inst 10,%temp}
  571.          {ifco ,next_n}
  572.          {comp cntr,%count}
  573.          {ifco this_one}
  574.          {incr count}
  575.          {goto next_n}
  576.  
  577.  {:this_one}
  578.          {setv count,1}
  579.          {setv cntr,1}
  580.          {wope-a %_hom%modem.set}
  581.          {writ}
  582. {writ ***********************************************************************}
  583. {writ *                                                                     *}
  584. {writ * CS-MAC.MAC has a macro which scans MODEM.DAT.   Data below has been *}
  585. {writ * selected from MODEM.DAT to best configure your COMMO/Modem combo.   *}
  586. {writ *                                                                     *}
  587. {writ ***********************************************************************}
  588.          {writ}
  589.          {writ %line}
  590.          {setv modem,%line}
  591.          {writ}
  592.          {setv cnfg,y}
  593.          {sete-p0 e_modem}
  594.          {disp 2,1,07,%modem%}
  595.          {inpu cnfg,Send Config to your Modem now?}
  596.  {:dsp_lp}
  597.          {inst line,configure}
  598.          {ifco ,no_send}
  599.          {subs line,12,70,%line}
  600.          {writ Configuration Line %count:  %line%}
  601.  {:do_cnfg}
  602.          {incr count}
  603.          {inst cnfg,y}
  604.          {ifco ,no_send}
  605.          {send ~~~~~%line}
  606.  {:no_send}
  607.          {inst line,init'lize}
  608.          {ifco ,no_init}
  609.          {subs line,12,70,%line}
  610.          {setv init, ^(set _modini,%line^)  From MODEM.DAT & CS-MAC.MAC}
  611.          {writ}
  612.          {writ %init%}
  613.          {writ}
  614.          {setv mod,y}
  615.  {:no_init}
  616.          {read line}
  617.          {comp line}
  618.          {ifco e_modem}
  619.          {goto dsp_lp}
  620.  
  621.  {:e_modem}
  622.          {clea}
  623.          {wclo}
  624.          {rclo}
  625.          {comp mod} {ifco nonote}
  626.  
  627. {disp 1,4,07,***********************************************************************}
  628. {disp 2,4,07,* CS-MAC.MAC has written to a file named                              *}
  629. {disp 2,45,07,%_hom%MODEM.SET}
  630. {disp 3,4,07,***********************************************************************^j^m}
  631.  
  632. {disp 7,4,07,***********************************************************************}
  633. {disp 8,4,07,* If you wish, the new INIT  can be substituted in your COMMO.SET     *}
  634. {disp 9,4,07,***********************************************************************^j^m}
  635.  
  636.          {sete-p0 nonote}
  637.          {inpu mod,Modify COMMO.SET?}
  638.          {inst mod,y}    {ifco ,nonote}
  639.  
  640.          {exec-n copy %_hom%commo.set %_hom%commoset.bak}
  641.          {rope %_hom%commoset.bak,nonote}
  642.          {wope %_hom%commo.set}
  643.  {:set_loop}
  644.          {read line}
  645.          {inst line,_modini}
  646.          {ifco insert}
  647.          {writ %line}
  648.          {goto set_loop}
  649.  {:insert}
  650.          {writ}
  651.          {inst line,^(}
  652.          {setv pos,%_pos}        {incr pos}
  653.          {subs line,%pos,80,%line}
  654.          {inst line,^)}
  655.          {setv pos,%_pos}        {decr pos}
  656.          {subs l1,1,%pos,%line}
  657.          {incr pos,2}
  658.          {subs l2,%pos,80,%line}
  659.          {setv line,  %l1% %l2%}
  660.          {setv l1}
  661.          {setv l2}
  662.          {writ %line}
  663.          {writ}
  664. {writ ***********************************************************************}
  665. {writ * CS-MAC.MAC has a macro which scans MODEM.DAT.   Data below has been *}
  666. {writ * selected from MODEM.DAT to best configure your COMMO/Modem combo.   *}
  667. {writ ***********************************************************************}
  668.          {writ}
  669.          {writ  %modem}
  670.          {writ}
  671.          {writ %init}
  672.          {goto set_loop}
  673.  {:nonote}
  674.          {setv 10}
  675.          {setv mod}
  676.          {setv ncol}
  677.          {setv cntr}
  678.          {setv oops}
  679.          {setv init}
  680.          {setv modem}
  681.          {disp %row,%col}
  682.          {setv row}
  683.          {setv col}
  684.          {macl %_mac}
  685.  {:intro}{clea}
  686.  
  687. {disp 3,4,07,***********************************************************************}
  688. {disp 4,4,07,*  CS-MAC.MAC can search MODEM.DAT just like a PCBoard (Z)ippy scan.  *}
  689. {disp 5,4,07,*  Enter a portion of manufacture or model or feature name to get a   *}
  690. {disp 6,4,07,*  list (e.i. "HST", "v.32", "Robotics", "Turbo", "Speed", "Zyxel")   *}
  691. {disp 7,4,07,***********************************************************************}
  692.  
  693. {disp 16,4,07,***********************************************************************}
  694. {disp 17,4,07,*                                                                     *}
  695. {disp 18,4,07,*    CS-MAC.MAC standing ready to scan MODEM.DAT to configure COMMO.  *}
  696. {disp 19,4,07,*                                                                     *}
  697. {disp 20,4,07,***********************************************************************}
  698.  
  699.          {retu}
  700.  
  701.  {:no_file}
  702.  
  703. {disp 16,4,07,***********************************************************************}
  704. {disp 17,4,07,*                                                                     *}
  705. {disp 18,4,07,* MODEM.DAT must be in your Commo Home directory: (                   *}
  706. {disp 19,4,07,*                                                                     *}
  707. {disp 20,4,07,***********************************************************************}
  708.  
  709. {disp 18,56,70, %_hom% }
  710. {disp 18,,07,)}
  711.          {disp %row,%col}
  712.          {macl %_mac}
  713.   *
  714. *─────────────────────────────────────────────────────────────────────────────
  715.   *
  716.   *  {macl modem.mac,x_late} in your COMMO.MAC to start.
  717.   *
  718.   *  This macro routine translates a file called MODEMS.DAT which is provided
  719.   *  to support ProComm Plus.  The resulting file is called MODEM.DAT.
  720.  
  721.  {:x_late}
  722.          {setv row,%_row}
  723.          {setv col,%_col}
  724.          {sete-p0 e_modem}
  725.          {ifex %_hom%modems.dat,,no_fils}
  726.          {rope %_hom%modems.dat,no_hits}
  727.          {wope %_hom%modem.dat}
  728.  
  729.  {:loop} {read line}
  730.          {inst line,initstring}  {ifco add_in}
  731.          {inst line,transmit}    {ifco add_cf}
  732.          {inst line,modem "}     {ifco add_mo}
  733.          {goto loop}
  734.  
  735.  {:add_in}
  736.          {setv pos,%_pos}
  737.          {incr pos,12}
  738.          {subs line,%pos,80,%line}
  739.          {inst line,"}
  740.          {setv pos,%_pos}        {decr pos}
  741.          {subs line,1,%pos,%line}
  742.          {setv line,Init'lize: %line}
  743.          {writ %line}
  744.          {goto loop}
  745.  
  746.  {:add_cf}
  747.          {setv pos,%_pos}
  748.          {incr pos,10}
  749.          {subs line,%pos,80,%line}
  750.          {inst line,"}
  751.          {setv pos,%_pos}        {decr pos}
  752.          {subs line,1,%pos,%line}
  753.          {setv line,Configure: %line}
  754.          {writ %line}
  755.          {goto loop}
  756.  
  757.  {:add_mo}
  758.          {writ}
  759.          {setv pos,%_pos}
  760.          {incr pos,7}
  761.          {subs line,%pos,80,%line}
  762.          {inst line,"}
  763.          {setv pos,%_pos}        {decr pos}
  764.          {subs line,1,%pos,%line}
  765.          {setv line,Modemmake: %line}
  766.          {writ %line}
  767.          {goto loop}
  768.  
  769.  {:no_hits}
  770.          {wclo}
  771.          {rclo}
  772.          {disp %row,%col}
  773.          {macl %_mac}
  774.  
  775.  {:no_fils}
  776.  
  777. {disp 16,4,07,***********************************************************************}
  778. {disp 17,4,07,*                                                                     *}
  779. {disp 18,4,07,* MODEMS.DAT must be in your Commo Home directory: (                  *}
  780. {disp 19,4,07,*                                                                     *}
  781. {disp 20,4,07,***********************************************************************}
  782.  
  783.          {disp 18,57,70, %_hom% }
  784.          {disp 18,,07, )}
  785.          {disp %row,%col}
  786.          {macl %_mac}
  787.  
  788.  ┌────────────────────────────────────────┐
  789.  │  Routine to strip comments from .MACs  │
  790.  └────────────────────────────────────────┘
  791.   *  This routine opens a .MAC file that you specify, reads it
  792.   *  line by line, deletes lines that have an asterisk within the first
  793.   *  three characters, and removes comments following a semi-colon.
  794.   *  The new file has a file extension of .CFS
  795.   *
  796.   *  The purpose of this routine is to minimize RAM usage by
  797.   *  shortening MAC files.
  798.  
  799.  {:strip}
  800.          {sete-p0 e_strip}
  801.          {setv file,%_hom%}
  802.  {:re_in}{inpu file,name of .MAC file to strip}
  803.          {inst %file,.} {ifco ,nodot} {setv pos,%_pos} {decr pos}
  804.          {subs file,1,%pos,%file} {setv pos}
  805.  {:nodot}{ifex %file%.mac,,re_in}               ;make sure file exists
  806.          {clea}
  807.          {disp 3,1,,Stripping %file%.MAC into %file%.CFS^m^j}
  808.          {disp ,,,Line: }
  809.          {rope %file%.mac,e_strip}              ;open .MAC to read
  810.          {wope %file%.cfs}                      ;open .CFS to write
  811.          {setv count,0}
  812.  {:s_loop}
  813.          {incr count}
  814.          {disp ,7,,%count}
  815.          {read line}
  816.          {comp line}    {ifco no_com}           ;write empty lines
  817.          {subs temp,1,3,%line}                  ;look at first three chars
  818.          {inst temp,*}  {ifco s_loop}           ; if a * skip the line
  819.          {subs temp,1,11,%line}                 ;look at first 11 chars
  820.          {inst temp,^(} {ifco ,no_com}          ;look for a left curley
  821.          {subs line,%_pos,255,%line}            ;delete leading whitespace
  822.          {inst line,;}  {ifco ,no_com}          ;look for a semicolon
  823.          {setv pos,%_pos}       {decr pos}      ;get semicolon position
  824.          {subs temp,%pos,255,%line}             ;what follows semicolon?
  825.          {inst temp,^)} {ifco no_com}           ; if a right curly, write!
  826.          {inst temp,)}  {ifco no_com}           ; if a right paren, write!
  827.          {subs line,1,%pos,%line}               ;otherwise, delete comment
  828.  
  829.  {:no_com}
  830.          {writ %line}                           ;xxx.MAC --> xxx.CFS file
  831.          {goto s_loop}                          ;read next line
  832.  {:e_strip}
  833.          {setv count}
  834.          {wclo}                                 ;close .CFS file
  835.          {disp 6,1,,%file.mac has been stripped into %file.cfs^m^j}
  836.          {exec-w10 dir %file.*}
  837.          {macl %_mac%,ret%ret}                  ;reload base.MAC
  838.  
  839.  ┌──────────────────────────────────┐
  840.  │  Menu driven .CFG file Routines  │
  841.  └──────────────────────────────────┘
  842.   *  These macro routines are designed for easy expansion and upgrading.
  843.   *  After a user has run CS-MAC once, future upgrades will build on the
  844.   *    initial configuration file.
  845.   *  This macro also copes when a user skips versions .... the resulting
  846.   *    .CFG file will have all (and only) new variable definitions appended.
  847.   *  The CS-MAC user won't need to edit old, unchanged data.
  848.  
  849.  {:new_user}
  850.          {call welcome}
  851.          {sete-p0 upgrade}
  852.          {call make_cfg}                        ;make default .cfg file
  853.  {:upgrade}
  854.          {sete-p0 ver_loop}
  855.          {call thanks}
  856.          {setv ver_ck,%ver}                     ;set var to check .cfg version
  857.  {:ver_loop}
  858.          {decr ver_ck}                          ;start looking for older .cfg
  859.          {leng %ver_ck}
  860.          {comp %_len,1} {ifco ,no_pad}          ;pad single digit version name
  861.          {setv ver_ck,0%ver_ck}                 ; with a leading zero
  862.  {:no_pad}
  863.          {ifex %_hom%cs-mac%ver_ck.cfg,appnd}   ;looking for old .cfg file
  864.          {comp ver_ck,06}  {ifco ,ver_loop}     ;if version = 06
  865.          {setv ver_ck}     {goto f_loop}        ;use CS-MAC.CFG (default)
  866.  
  867.  {:appnd}
  868.          {wope-a %_hom%cs-mac%ver_ck.cfg}       ;open old .cfg in append
  869.          {call %ver_ck}                         ;add new default variables
  870.  
  871.  {:f_loop}
  872.          {sete-p0 bail_out}
  873.          {rope %_hom%cs-mac%ver_ck.cfg,ready}   ;open old cs-macxx.cfg to read
  874.          {wope %_hom%cs-mac%ver.cfg}            ;open newest version cs-mac.cfg
  875.          {writ   *  CS-MAC%ver.CFG}             ;Header for newest .CFG file
  876.          {writ   *  %_dat%  %_tim%}
  877.          {writ}
  878.          {disp 9,22,,Remember ... Alt-Y will erase input field}
  879.  {:ug_loop}
  880.          {read line}
  881.          {inst line,*}  {ifco write}            ;keep old default headers
  882.          {comp line}    {ifco write}            ;write blank lines
  883.          {inst line,;}  {ifco ,no_pmt}          ;use semicolon for prompts
  884.          {setv pos,%_pos} {incr pos}
  885.          {subs prompt,%pos,30,%line}
  886.          {inst line,  }                         ;use two spaces to end variable
  887.          {setv pos,%_pos} {decr pos}            ; to allow space in name, etc.
  888.          {subs line,1,%pos,%line}
  889.  {:no_pmt}
  890.          {inst line,,}  {ifco ,ug_loop}         ;is this a variable definition?
  891.          {setv pos,%_pos} {decr pos}
  892.          {subs var,1,%pos,%line}
  893.          {incr pos,2}
  894.          {subs valu,%pos,40,%line}
  895.          {inpu valu,%var = %prompt}             ;setv according to .cfg
  896.          {setv pad,                                    }
  897.          {leng %var%,%valu}
  898.          {setv pad_l,40}
  899.          {decr pad_l,%_len}
  900.          {subs pad,1,%pad_l,%pad}
  901.          {writ %var%,%valu%%pad%;%prompt}
  902.          {goto ug_loop}                         ;loop until .cfg all read
  903.  
  904.  {:write}{writ %line}   {goto ug_loop}
  905.  
  906.  {:bail_out}
  907.          {rclo}
  908.          {wclo}
  909.          {exec-n del %_hom%cs-mac%ver.cfg}
  910.          {goto commo}
  911.  
  912.  {:ready}
  913.          {sete-p0 commo}
  914.          {wclo}
  915.          {disp 9,20,,                                             }
  916.          {disp 9,1,,%_hom%cs-mac%ver%.cfg has been written.}
  917.          {disp 10,1,,It will be read into your COMMO startup.^j^j^m}
  918.          {paus 10}
  919.  
  920.  {:commo}{setv var}     {setv valu}
  921.          {setv pos}     {setv prompt}
  922.          {setv pad}     {setv pad_l}
  923.          {setv ver_ck}
  924.          {wclo}
  925.          {macl %_mac%,start}
  926.  
  927.  {:welcome}
  928.          {sete-p0 w_esc}
  929.          {ifex %_hom%how,,no_how}
  930.          {rope %_hom%how,end_w}
  931.          {setv count,1}
  932.          {stat n}
  933.  {:w_lop}{read line}
  934.          {disp ,,,     %line^m^j}
  935.          {incr count}
  936.          {comp count,20}
  937.          {ifco-l w_lop}
  938.          {disp ,,,^m^j   Press Spacebar to continue ... }
  939.          {setl 60,w_esc}
  940.          {look  }
  941.  {:w_esc}{setv count,1}
  942.          {disp ,,,^m                                  ^m}
  943.          {goto w_lop}
  944.  {:end_w}{sete-p0 no_how}
  945.          {disp ,,,^m^j   Press Spacebar to continue ... }
  946.          {setl 60,w_lop}
  947.          {look  }
  948.          {disp ,,,^m                                  ^m}
  949.  {:no_how}
  950.          {stat y}
  951.          {clea}
  952.          {disp ,,,                        Welcome to the CS-MAC series!^m^j}
  953.          {disp ,,,             A default config file (CS-MAC.CFG) has been written for you ... ^m^j}
  954.          {retu}
  955.  
  956.  {:thanks}
  957.          {disp ,,,^j^j^m}
  958.          {disp ,,,       Thank you for using the CS-MAC series.^m^j}
  959.          {disp ,,,       You will now be prompted to confirm or change the setting^m^j}
  960.          {disp ,,,       of variables for your  *PERSONAL*  %hom%CS-MAC%ver%.CFG file.^m^j}
  961.          {retu}
  962.  
  963.  {:make_cfg}
  964.          {wope %_hom%cs-mac.cfg}
  965.          {writ   *  CS-MACxx                   Default Version %ver}
  966.          {writ}
  967.          {writ   *  The config file feature of the CS-MAC series}
  968.          {writ   *  is designed to make future upgrades easier.}
  969.          {writ}
  970.          {writ   *  An empty line or a line with a "*" in it will be ignored}
  971.          {writ   *  during variable definition.  These are comment lines.}
  972.          {writ}
  973.          {writ   *  The order of "setv" items is unimportant.}
  974.          {writ}
  975.          {writ   *  Each variable setting line in this .CFG file has}
  976.          {writ   *  this form       variable,value     ;comment here}
  977.          {writ}
  978.          {writ name,Chuck Seyboldt                     ;your logon name}
  979.          {writ sig,Chuck∙S                             ;your signature}
  980.          {writ v_ph,414-250-0512                       ;your Voice Phone Number}
  981.          {writ d_ph,207-761-4782                       ;your Data  Phone Number}
  982.          {writ b_day,04/23/65                          ;your Birthdate}
  983.          {writ auto,n                                  ;"y" for Autopilot ON}
  984.          {writ xpert,n                                 ;"y" for complex DOORWAY toggle}
  985.          {writ ramdr,d:                                ;your RAMDrive}
  986.          {writ bu_dr,b:                                ;Backup drive for .MACs}
  987.          {writ dosdir,c:\dos                           ;your DOS dir}
  988.          {writ ins_dir,c:\co\ins                       ;dir for docs & instructions}
  989.          {writ lst_dir,c:\doc                          ;dir for BBS file list storage}
  990.          {writ savedir,c:\co\sav                       ;dir for capture files}
  991.          {writ utildir,c:\util                         ;dir for utility programs}
  992.          {writ ext_ed,c:\util\qedit.exe                ;drive:\path\external_editor}
  993.          {writ ext_li,c:\util\list.com                 ;drive:\path\external_lister}
  994.          {writ pk_zip,c:\util\pkzip.exe                ;drive:\path\ZIP_program}
  995.          {writ pk_un,c:\util\pkunzip.exe               ;drive:\path\UNZIP_program}
  996.          {writ prot,z                                  ;file trans protocol (z,y,x)}
  997.          {writ mprot,z                                 ;mail trans protocol (z,y,x)}
  998.          {writ qwkdr,c:\qwk                            ;dir for .QWK files}
  999.          {writ repdr,c:\qwk                            ;dir for .REP files}
  1000.          {writ reader,c:\jr\jabber.exe                 ;your mail reader program}
  1001.          {writ tagfile,c:\jr\taglines.tag              ;filename for your taglines}
  1002.          {writ qrdr,qwk                                ;.QWK packet rename routine}
  1003.          {writ znr,znr                                 ;.ZNS packet rename routine}
  1004.          {writ handle,cboldt                           ;handle for Internet use}
  1005.          {writ znrdr,c:\znr                            ;dir for ZIPNEWS reader}
  1006.          {writ znpak,c:\qwk                            ;dir for ZIPNEWS packets}
  1007.          {writ cap,%%savedir\%%_mon%%%%_day.cap            ;capture filename}
  1008.  {:07}   {writ}
  1009.  
  1010.          {writ shh,                                    ;if "y", quiets speech}
  1011.          {writ color,y                                 ;Answer to ANSI graphics? prompt}
  1012.          {writ fast, q ns                              ;"quick non-stop" modifiers}
  1013.          {writ random_t,30                             ;Max 60...# of lines in tagfile}
  1014.          {writ ext_fl,c:\dos\commopns.exe              ;Name of upload lister}
  1015.          {writ ext_di,c:\util\phone.exe                ;Name of external dialer}
  1016.  
  1017.          {writ}
  1018.          {writ   *  New variables will be appended based on the}
  1019. end ver  {writ   *  latest CS-MACxx.CFG in your %_hom directory}
  1020.  {:08}   {writ}
  1021.  
  1022.          (writ v9_var,version9                  ;append later version vars here)
  1023. end ver  (writ v9_v#2,version_9                 ;follow this example format)
  1024.  {:09}   (writ)
  1025.  
  1026.          (writ v10_var,version10                ;even later version!)
  1027. end ver  (writ v10_v#2,version_10               ;more .cfg expansion)
  1028.  {:10}   (writ)
  1029.  
  1030.          {wclo}
  1031.          {retu}
  1032.