home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / commo45.zip / MACROS.TXT < prev    next >
Text File  |  1991-01-12  |  6KB  |  140 lines

  1.                   ┌───────────────────────────┐
  2.                   │ Additional Macro Examples │
  3.                   └───────────────────────────┘
  4.  
  5. This file contains a number of sample macros.  Feel free to copy any of them
  6. to COMMO.MAC and to alter them to your own needs.  Additions will be made to
  7. this file as time permits.  Thanks to the users for their contributions.
  8.  
  9. {COMMO} macros can be made to do many amazing things besides just logging into
  10. BBS's and doing mail runs (those are indeed popular functions, however).  Some
  11. of the simplest macros demonstrate this capability.
  12.  
  13.  
  14.  The next two macros are used for reading messages.  They use the grey plus
  15.  and minus keys in the lower right corner of the keyboard. The first one sends
  16.  a <cr>, then clears the screen.  Makes messages a lot easier to read since
  17.  each one starts displaying at the top of the screen.  The second macro just
  18.  sends a <cr>.  Nice for keyboards without the extra enter key.
  19.  
  20.  Message reading macros
  21.  ───────────────────────────────────────────────────────────────────────────
  22.  {gr+}  {send |} {clear} {}
  23.  {gr-}  {send ^M} {}
  24.  
  25.  
  26.  Start my mail reader after a mail run
  27.  ───────────────────────────────────────────────────────────────────────────
  28.  {cF4}  {exen slmr} {}            SLMR
  29.  
  30.  
  31.  My generic login macro will login to most popular BBS's.  The generic login
  32.  subroutine can be called from mail run macros, etc.  The GOLOok with the
  33.  ";passwor" ignores the string "password" in the opening instructions on an
  34.  Auntie board.
  35.  
  36.  Generic login macro
  37.  ───────────────────────────────────────────────────────────────────────────
  38.  {...}  {capture y,c:\commo\commo.cap}      RBBS, PCBoard, Auntie, etc.
  39.         {call gls} {}
  40.  
  41.  Generic login subroutine
  42.  ───────────────────────────────────────────────────────────────────────────
  43.   {gls} {setlook 60,hng}
  44.   {li1} {golook li4,graphics}  {golook li2,first name}
  45.         {golook li3,last name} {golook li4,correct} {golook li1,;passwor}
  46.         {lookfor password}     {send ~#|} {return}
  47.   {li2} {send ~Fred|}      {goto li1}
  48.   {li3} {send ~Brucker|}   {goto li1}
  49.   {li4} {send ~y|}         {goto li1}
  50.  
  51.  
  52.  Motherboard mail run
  53.  ───────────────────────────────────────────────────────────────────────────
  54.  {mot} {capture y,c:\commo\mother.cap} {asci ,}
  55.        {setlook 90,hng} {lookfor (enter)=no} {send n q ns|}
  56.        {call gls} {setlook 60,hng,3,n|}
  57.        {lookfor board command?} {setlook 90,hng}  ═ turn off prompt timer
  58.        {send open 8|} {look markmail command?}
  59.        {ifexist c:\ul\julie.rep,,mb2} {send u|}
  60.        {lookfor ^xB01}
  61.        {execute DSZ port %p sz -m %u\julie.rep} {lookfor command?}
  62.  {mb2} {send dg|} {lookfor ^xB00} {call .z.} {call ncr} {return}
  63.  
  64.  
  65.  Here's my latest whizbang quoting macro.  It changes the Screen Image file to
  66.  a temporary file, then goes into Scrollback.  In Scrollback I write a block
  67.  of text to the Screen Image file (the quote), then exit.  My editor (QEdit)
  68.  is then executed on the temporary file.  I do what I need there to dress up
  69.  the quote (like add quoting marks, etc.).  When I save the file and exit the
  70.  editor, the macro does an ASCII Upload of the file, deletes it and restores
  71.  the Screen Image filename to what it was before.
  72.  
  73.  Quoting macro
  74.  ───────────────────────────────────────────────────────────────────────────
  75.  {cf6} {screen n,c:\dl\temp} {scroll} {exen q c:\dl\temp} {asci c:\dl\temp}
  76.        {exen del c:\dl\temp} {screen n,c:\commo\commo.scn} {}
  77.  
  78.  
  79.  The following macro can be executed from the command line with the switch
  80.  "/m=dda".  It will login to Directory Assistance RBBS, read and capture all
  81.  messages in the MAIN, COMMO and COMM conferences, download ANYFILE.ZIP, then
  82.  logoff.  After 50 dialing tries it will give up and beep twice.
  83.  
  84.    (put "dir" in the Dialing Directory macro field)
  85.  ───────────────────────────────────────────────────────────────────────────
  86.  {dda}  {mark direc} {dial 50,bp2} {alarm 3} {}
  87.  {bp2}  {beep} {beep} {}
  88.  
  89.  {dir}  {capture y,c:\commo\direc.cap} {asci ,:}
  90.         {setlook 60,hng,3,n|}
  91.         {lookfor first name?} {send Fred Brucker|~#|}
  92.         {call di1}
  93.         {setlook ,,3,|}
  94.         {call di2} {call di1}
  95.         {send j commo|}
  96.         {call di2} {call di1}
  97.         {send j comm|}
  98.         {call di2} {call di1}
  99.         {send j main|} {call di1}
  100.         {send d;anyfile.zip;z|}
  101.         {execute dsz port %p rz} {call di1}
  102.         {send g|} {capture n} {call ncr} {return}
  103.  
  104.  {di1}  {lookfor your command?} {return}
  105.  {di2}  {send r s c|} {lookfor [q]uit} {return}
  106.  {ncr}  {setlook 20} {lookfor no carrier} {return}
  107.  
  108.  
  109.  This macro is a mini host mode.  It will answer on the first ring, send a
  110.  welcome message, wait for a password, then execute the batch file HOST.BAT.
  111.  When you exit back to DOS it will hang up and recycle for the next call.  A
  112.  simple version of HOST.BAT might be:
  113.  
  114.         ctty com%1
  115.         command
  116.  
  117.  Instead of CTTY you could use a program such as DoorWay by Marshall Dudley
  118.  (available as Shareware).
  119.  ───────────────────────────────────────────────────────────────────────────
  120.  {hos} {capture y,c:\commo\host.cap} {localecho y}
  121.  
  122.  {hs1} {setlook 0} {lookfor ring} {send ~~~ata|}
  123.        {golook hs2,CONNECT 1200}
  124.        {lookfor CONNECT 2400}
  125.        {parms 2400,8} {goto hs3}
  126.  {hs2} {parms 1200,8}
  127.  
  128.  {hs3} {pause 2}
  129.        {send ^L   Welcome!!!|^J^J   Enter password: }
  130.        {setlook 5,hs4}
  131.        {lookfor f} {send .}      Put your password here
  132.        {lookfor r} {send .}      (my password is "fred|", | is a cr)
  133.        {lookfor e} {send .}
  134.        {lookfor d} {send .}
  135.        {lookfor |}
  136.        {send |^J^J^J   Login complete.|^J^J   Calling host, please wait ...}
  137.        {execute c:\commo\host %p}
  138.  {hs4} {pause 1} {hangup y} {goto hs1}
  139.  
  140.