
                    SMAC (Send Macros) v0.39 d07/30/93
                    (c) Copyright 1991,2,3 CalcShop Inc.


     1.0 Why Use SMAC

     You can use SMAC to set printer fonts, dial a modem, reset your 
     priter or modem, etc. SMAC copies strings, to a printer (PRN:), 
     communications port (COM1:, COM2:, etc.), disk file or other output 
     destination. It expands any embedded macros according to the 
     SMAC.SET file. It can send control codes as well as printable 
     alphanumeric characters and symbols.

     I find it easier to use SMAC to set my printer to lineprinter
     (compressed) font before printing a wide report than to go through
     the printer's menu maze. I also find it easier to eject a page or 
     reset my printer from the keyboard using SMAC than to reach over to 
     the printer to do it. I've also used SMAC to insert page breaks 
     between text files which I was combining (concatenating). I've used 
     SMAC to reset my modem, and, on rare occasion, to dial it or set it 
     to auto answer mode.



     2.0 How to Use SMAC

     Usage: SMAC [Arguments] [Strings [Macros] [EscapedCharacters]]

     The strings can contain alphanumeric characters, as well as macros
     and escaped characters. Macros allow you to send a long string of
     characters by typing just one or two. Escaped characters allow you
     to send control codes and other non-printing codes. If you need to
     embed spaces in a string, enclose the string in double quotes. For
     example "dog and cat" sends the characters including the two
     embedded spaces.


     2.1 Macros

     Useable macros depend on your SMAC.SET file, and are case sensitive 
     unless both upper and lower case characters are specified in 
     SMAC.SET. Typical printer macros are:

         c+ = begin compressed (line printer) font
         C+ = begin compressed (line printer) font
         c- = end compressed (line printer) font
         C- = end compressed (line printer) font
         t+ = begin typewriter (courier) font
         T+ = begin typewriter (courier) font
         n+ = newline = line feed + carriage return
         N+ = newline = line feed + carriage return
         f+ = form feed
         F+ = form feed
         r+ = Reset printer to power up mode
         R+ = Reset printer to power up mode

     The supplied SMAC.SET file contains the appropriate macro expansions
     to control an HP Laser Jet.


     2.2 Escaped Characters

     Escape codes consist of the backslash followed by exactly 3 decimal
     digits which specify the ASCII code for the character:

     \ddd = Decimal ascii code ddd, where ddd = 3 digits"

     Example, "\009" embedded in a string or macro expansion will send
     Ctrl+I. Example, "\027" sends the Escape character designated "Esc"
     on your keyboard.

     SMAC also recognizes abbreviations for certain common escaped
     characters:

         \n = \010\013 = newline = line feed + carriage return
         \f = \012     = form feed
         \s = \032     = space

     The backslash can also be used to escape itself, arguments, macros
     and escaped characters:

     \\  = \092 = backslash
     \c+ = c+   = escapes c+ macro, sending "c" and "+"
                  characters instead
     \\f = \f   = escapes \\f escape, sending "\" and "f"
                  characters instead
     \-o =      = escapes argument below sending characters instead


     2.3 Arguments

     Arguments include:
         -odestination  = send output to destination, default = PRN
         -ssetfile      = use SETFILE.SET, default = SMAC.SET



     3.0 Example of SMAC.SET

     Here are the entries in the standard SMAC.SET. We assume it is used
     in the examples below. They were chosen to control an HP Laser Jet
     printer.

     Macro    Expansion
     -------- ---------
     "n+"     "\010\013"
     "f+"     "\012"
     "r+"     "\027E"
     "c+"     "\027(s16.66H"
     "c-"     "\027(s10H"
     "t+"     "\027(s10H"

     Make a copy of the original SMAC.SET, then you can use any ASCII
     editor to modify it to you needs. SMAC only recognizes lines that
     start with a double quote. It assumes the first double quoted string
     is a macro and the second is the expansion for the macro. When it
     encounters any macro in a string, it replaces it with its expansion.



     4.0 Examples of Controlling an HP Laser Jet Printer Compatible

     Note: Printer must be PRN:. If the printer is on "LPT2:",  "smac"
     must be replaced by "smac -oLPT2".

     Command          Result
     ---------------- --------------------------------------------
     smac r+c+        Reset printer. Set to lineprinter font.
     copy sample prn  Print the file sample in lineprinter font.
     smac c-f+        Reset to default courrier font. Eject page.



     5.0 Example of Dialing a Hayes Compatible Modem

     Note: the modem must be in command mode, and the modem must be
     connected to "COM1:".

     Command                         Result
     ------------------------------- -------------------------------------
     smac -ocom1 ATTD555-1212\n      Tone dial 555-1212 on modem
     smac -ocom1 "AT TD 555 1212\n"  Tone dial 555-1212 on modem
     smac -ocom1 ATH\n               Hang up modem
     smac -ocom1 ATZ\n               Reset modem
     smac -ocom1 ATH ATZ\n           Hang up & reset modem. No spaces sent.
     smac -ocom1 "AT H AT Z\n"       Hang up & reset modem. 3  spaces sent.
     smac -ocom1 "AT H" "AT Z\n"     Hang up & reset modem. 2  spaces sent.
     smac -ocom1 AT H AT Z\n         Hang up & reset modem. No spaces sent.


                   SMAC (Send Macros) Registration Form
                             v0.39 d07/30/93


     Registered owners receive a disk with the latest SMAC program. The
     SMAC C++ source code is available for an additional fee. To run
     SMAC, all you need is the Runtime License. If you buy the source
     code, you can modify it and use all or parts of it in your own
     programs.

     SMAC is not free. After you try it and decide to continue to use it,
     you must pay the $7.00 Runtime License fee below by check or credit
     card, or contact us for a site license. Call or write to the
     address at the bottom. Make checks payable to CalcShop Inc.

                                                   Single       Site
     Description                                 User Fee    License
     -----------------------------------------   --------    -------
     SMAC Runtime License (required)             $   7.00       call
     SMAC C++ source code (optional)             $  12.00       call
     SMAC C++ Runtime License and source code    $  19.00       call

     If you want to use the library simutaneously on several computers or
     at several locations please contact us regarding site licenses.


          Telephone: ___________________________________________________

               Name: ___________________________________________________

            Company: ___________________________________________________

            Address: ___________________________________________________

     City/State/Zip: ___________________________________________________



     Check Enclosed: __  or

     Visa/MC card #: _______ ______ ______ ______

     Expiration    : ____/____/____


     If you  remember, where did you get this program? ___________________

     We also do custom programming for investments, finance and accounting.


     

                                  Robert Emmons
                                  CalcShop Inc.
                                  P.O. Box 1231
                              W. Caldwell, NJ 07007
                       Phones: (201)228-9139 or (800)466-3469
