home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / AMWP-2.ZIP / MACROS.ZIP / MACNEW.SMM < prev    next >
Encoding:
INI File  |  1990-05-02  |  6.2 KB  |  833 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     
  5. [files]
  6. [prn]
  7.     PCL / HP LaserJet
  8. [lang]
  9.     1
  10. [desc]
  11.     Runs  when a specified style sheet is chosen when creating a new file.  This macro doesn't do much.  Use as an example.
  12.     
  13.     
  14.     
  15.     
  16.     641683098
  17.     11
  18.     641336165
  19. [fopts]
  20.     0
  21.     1
  22.     0
  23.     0
  24. [lnopts]
  25.     2
  26.     Body Text
  27. [docopts]
  28.     5
  29.     2
  30. [tag]
  31.     Body Text
  32.     2
  33.     [fnt]
  34.         Courier
  35.         240
  36.         0
  37.         32768
  38.     [algn]
  39.         225
  40.         1
  41.         0
  42.         0
  43.         0
  44.     [spc]
  45.         17
  46.         273
  47.         1
  48.         144
  49.         0
  50.         1
  51.         100
  52.     [brk]
  53.         4
  54.     [line]
  55.         8
  56.         0
  57.         1
  58.         0
  59.         1
  60.         1
  61.         1
  62.         10
  63.         10
  64.         1
  65.     [spec]
  66.         0
  67.         0
  68.         
  69.         0
  70.         1
  71.         0
  72.         0
  73.         0
  74.         0
  75.         0
  76.     [nfmt]
  77.         280
  78.         1
  79.         3
  80.         .
  81.         ,
  82.         $
  83. [tag]
  84.     Body Single
  85.     3
  86.     [fnt]
  87.         Courier
  88.         240
  89.         0
  90.         32768
  91.     [algn]
  92.         225
  93.         1
  94.         0
  95.         0
  96.         0
  97.     [spc]
  98.         17
  99.         273
  100.         1
  101.         0
  102.         0
  103.         1
  104.         100
  105.     [brk]
  106.         4
  107.     [line]
  108.         8
  109.         0
  110.         1
  111.         0
  112.         1
  113.         1
  114.         1
  115.         10
  116.         10
  117.         1
  118.     [spec]
  119.         0
  120.         0
  121.         
  122.         0
  123.         1
  124.         0
  125.         0
  126.         0
  127.         0
  128.         0
  129.     [nfmt]
  130.         280
  131.         1
  132.         3
  133.         .
  134.         ,
  135.         $
  136. [tag]
  137.     First Indent
  138.     4
  139.     [fnt]
  140.         Courier
  141.         240
  142.         0
  143.         32768
  144.     [algn]
  145.         161
  146.         1
  147.         0
  148.         360
  149.         0
  150.     [spc]
  151.         17
  152.         273
  153.         1
  154.         144
  155.         0
  156.         1
  157.         100
  158.     [brk]
  159.         4
  160.     [line]
  161.         8
  162.         0
  163.         1
  164.         0
  165.         1
  166.         1
  167.         1
  168.         10
  169.         10
  170.         1
  171.     [spec]
  172.         0
  173.         0
  174.         
  175.         0
  176.         1
  177.         0
  178.         0
  179.         0
  180.         0
  181.         0
  182.     [nfmt]
  183.         280
  184.         1
  185.         3
  186.         .
  187.         ,
  188.         $
  189. [tag]
  190.     Justified
  191.     5
  192.     [fnt]
  193.         Courier
  194.         240
  195.         0
  196.         32768
  197.     [algn]
  198.         232
  199.         1
  200.         0
  201.         0
  202.         0
  203.     [spc]
  204.         17
  205.         273
  206.         1
  207.         144
  208.         0
  209.         1
  210.         100
  211.     [brk]
  212.         4
  213.     [line]
  214.         8
  215.         0
  216.         1
  217.         0
  218.         1
  219.         1
  220.         1
  221.         10
  222.         10
  223.         1
  224.     [spec]
  225.         0
  226.         0
  227.         
  228.         0
  229.         1
  230.         0
  231.         0
  232.         0
  233.         0
  234.         0
  235.     [nfmt]
  236.         280
  237.         1
  238.         3
  239.         .
  240.         ,
  241.         $
  242. [tag]
  243.     First Bullet
  244.     6
  245.     [fnt]
  246.         Courier
  247.         240
  248.         0
  249.         32768
  250.     [algn]
  251.         65
  252.         1
  253.         720
  254.         0
  255.         360
  256.     [spc]
  257.         17
  258.         273
  259.         1
  260.         144
  261.         0
  262.         1
  263.         100
  264.     [brk]
  265.         4
  266.     [line]
  267.         8
  268.         0
  269.         1
  270.         0
  271.         1
  272.         1
  273.         1
  274.         10
  275.         10
  276.         1
  277.     [spec]
  278.         0
  279.         0
  280.         <*0>
  281.         360
  282.         1
  283.         1
  284.         0
  285.         0
  286.         0
  287.         0
  288.     [nfmt]
  289.         280
  290.         1
  291.         3
  292.         .
  293.         ,
  294.         $
  295. [tag]
  296.     Second Bullet
  297.     7
  298.     [fnt]
  299.         Courier
  300.         240
  301.         0
  302.         32768
  303.     [algn]
  304.         65
  305.         1
  306.         1080
  307.         0
  308.         360
  309.     [spc]
  310.         17
  311.         273
  312.         1
  313.         144
  314.         0
  315.         1
  316.         100
  317.     [brk]
  318.         4
  319.     [line]
  320.         8
  321.         0
  322.         1
  323.         0
  324.         1
  325.         1
  326.         1
  327.         10
  328.         10
  329.         1
  330.     [spec]
  331.         0
  332.         0
  333.         <*1>
  334.         360
  335.         1
  336.         1
  337.         0
  338.         0
  339.         0
  340.         0
  341.     [nfmt]
  342.         280
  343.         1
  344.         3
  345.         .
  346.         ,
  347.         $
  348. [tag]
  349.     Indented 1
  350.     8
  351.     [fnt]
  352.         Courier
  353.         240
  354.         0
  355.         32768
  356.     [algn]
  357.         193
  358.         1
  359.         1080
  360.         0
  361.         0
  362.     [spc]
  363.         17
  364.         273
  365.         1
  366.         144
  367.         0
  368.         1
  369.         100
  370.     [brk]
  371.         4
  372.     [line]
  373.         8
  374.         0
  375.         1
  376.         0
  377.         1
  378.         1
  379.         1
  380.         10
  381.         10
  382.         1
  383.     [spec]
  384.         0
  385.         0
  386.         
  387.         0
  388.         1
  389.         0
  390.         0
  391.         0
  392.         0
  393.         0
  394.     [nfmt]
  395.         280
  396.         1
  397.         3
  398.         .
  399.         ,
  400.         $
  401. [tag]
  402.     Indented 2
  403.     9
  404.     [fnt]
  405.         Courier
  406.         240
  407.         0
  408.         32768
  409.     [algn]
  410.         193
  411.         1
  412.         1440
  413.         0
  414.         0
  415.     [spc]
  416.         17
  417.         273
  418.         1
  419.         144
  420.         0
  421.         1
  422.         100
  423.     [brk]
  424.         4
  425.     [line]
  426.         8
  427.         0
  428.         1
  429.         0
  430.         1
  431.         1
  432.         1
  433.         10
  434.         10
  435.         1
  436.     [spec]
  437.         0
  438.         0
  439.         
  440.         0
  441.         1
  442.         0
  443.         0
  444.         0
  445.         0
  446.         0
  447.     [nfmt]
  448.         280
  449.         1
  450.         3
  451.         .
  452.         ,
  453.         $
  454. [tag]
  455.     Line Above
  456.     11
  457.     [fnt]
  458.         Courier
  459.         240
  460.         0
  461.         32768
  462.     [algn]
  463.         225
  464.         1
  465.         0
  466.         0
  467.         0
  468.     [spc]
  469.         17
  470.         273
  471.         1
  472.         288
  473.         0
  474.         1
  475.         100
  476.     [brk]
  477.         4
  478.     [line]
  479.         5
  480.         0
  481.         1
  482.         0
  483.         1
  484.         2
  485.         1
  486.         92
  487.         10
  488.         1
  489.     [spec]
  490.         0
  491.         0
  492.         
  493.         0
  494.         1
  495.         0
  496.         0
  497.         0
  498.         0
  499.         0
  500.     [nfmt]
  501.         280
  502.         1
  503.         3
  504.         .
  505.         ,
  506.         $
  507. [tag]
  508.     Bold & Center
  509.     12
  510.     [fnt]
  511.         Courier
  512.         240
  513.         0
  514.         32769
  515.     [algn]
  516.         228
  517.         1
  518.         0
  519.         0
  520.         0
  521.     [spc]
  522.         17
  523.         273
  524.         1
  525.         0
  526.         0
  527.         1
  528.         100
  529.     [brk]
  530.         4
  531.     [line]
  532.         8
  533.         0
  534.         1
  535.         0
  536.         1
  537.         1
  538.         1
  539.         10
  540.         10
  541.         1
  542.     [spec]
  543.         0
  544.         0
  545.         
  546.         0
  547.         1
  548.         0
  549.         0
  550.         0
  551.         0
  552.         0
  553.     [nfmt]
  554.         280
  555.         1
  556.         3
  557.         .
  558.         ,
  559.         $
  560. [lay]
  561.     Standard
  562.     513
  563.     [rght]
  564.         15840
  565.         12240
  566.         1
  567.         1440
  568.         1440
  569.         1
  570.         1440
  571.         1440
  572.         2
  573.         1
  574.         0
  575.         1
  576.         1
  577.         2
  578.         1
  579.         1440
  580.         10800
  581.         12
  582.         1
  583.         720
  584.         1
  585.         1440
  586.         1
  587.         2160
  588.         1
  589.         2880
  590.         1
  591.         3600
  592.         1
  593.         4320
  594.         1
  595.         5040
  596.         1
  597.         5760
  598.         1
  599.         6480
  600.         1
  601.         7200
  602.         1
  603.         7920
  604.         1
  605.         8640
  606.     [hrght]
  607.     [lyfrm]
  608.         1
  609.         11200
  610.         0
  611.         0
  612.         12240
  613.         1440
  614.         1
  615.         1
  616.         3
  617.         1
  618.         0
  619.         0
  620.         0
  621.     [frmlay]
  622.         1440
  623.         12240
  624.         1
  625.         1440
  626.         0
  627.         1
  628.         0
  629.         1440
  630.         0
  631.         1
  632.         0
  633.         1
  634.         1
  635.         0
  636.         1
  637.         1440
  638.         10800
  639.         0
  640.     [txt]
  641. >
  642.     [frght]
  643.     [lyfrm]
  644.         1
  645.         13248
  646.         0
  647.         14400
  648.         12240
  649.         15840
  650.         1
  651.         1
  652.         3
  653.         1
  654.         0
  655.         0
  656.         0
  657.     [frmlay]
  658.         15840
  659.         12240
  660.         1
  661.         1440
  662.         0
  663.         1
  664.         14400
  665.         1440
  666.         0
  667.         1
  668.         0
  669.         1
  670.         1
  671.         0
  672.         1
  673.         1440
  674.         10800
  675.         0
  676.     [txt]
  677. >
  678. [elay]
  679. [l1]
  680.     0
  681. [edoc]
  682. '
  683.  
  684. ' NewFun - perform various macro functions when a file is first
  685.  
  686. '    created.  This macro was designed to run directly from the
  687.  
  688. '    File/New menu.
  689.  
  690. '
  691.  
  692. FUNCTION newfun()
  693.  
  694. DECLARE    TypeToFrom(p1, p2)
  695.  
  696. if (new)
  697.  
  698.     ' OK  a new file blank file has been created.  Get the
  699.  
  700.     ' StyleSheet name and then decide what to do.
  701.  
  702.     sty = GetDocDesc$(DDStylesheet)
  703.  
  704. '********************************************************
  705.  
  706. ' Put the style you want to use in place of ~MEMO1.STY'
  707.  
  708. '********************************************************
  709.  
  710.     if (ucase$(sty) = "~MEMO1.STY")
  711.  
  712.         ' Its a memo, get the whoto and whofrom then type
  713.  
  714.         ' that into the file for them.
  715.  
  716.  
  717.         macpath = GetProfileString$("", "macrodir")
  718.  
  719.         stat = DialogBox("{macpath}\tofrom.ext", "tofrom")
  720.  
  721.         if (1 = stat)
  722.  
  723.             whoto = GetDialogField$(8000)
  724.  
  725.             whofrom = GetDialogField$(8001)
  726.  
  727.             TypeToFrom(whoto, whofrom)
  728.  
  729.         elseif (-1 = stat)
  730.  
  731.             message("Error finding the dialog box")
  732.  
  733.         endif
  734.  
  735.     endif
  736.  
  737. endif
  738.  
  739.  
  740. END FUNCTION<:p<* >>
  741.  
  742. '
  743.  
  744. ' TypeToFrom - type in to and from.  This first line will contain
  745.  
  746. '    the date. 
  747.  
  748. '
  749.  
  750. FUNCTION TypeToFrom(tox, fromx)
  751.  
  752. SetStyle("Date")
  753.  
  754. InsertDate(Today, UMDY)
  755.  
  756. Type("<[>enter]<[>enter]")
  757.  
  758. @Date@
  759. SetStyle("To")
  760.  
  761. Type("TO: {tox}<[>enter]")
  762.  
  763.  
  764. SetStyle("From")
  765.  
  766. Type("FROM: {fromx}<[>enter]")
  767.  
  768. SetStyle("Body Text")
  769.  
  770. Type("<[>enter]")
  771.  
  772. END FUNCTION
  773.  
  774.  
  775.  
  776. >
  777. [macsum] 2
  778. newfun 0 0 6 5
  779. TypeToFrom 363 2 1 35
  780. [macse]
  781. 14 newfun
  782. 24 101
  783. 13
  784. 11 00000351
  785. 0 279 3
  786. 13
  787. 8 1
  788. 0 18 "{1}"
  789. 13
  790. 7 "~MEMO1.STY"
  791. 18 0
  792. 11 00000351
  793. 0 286 "" "macrodir"
  794. 13
  795. 8 2
  796. 0 26 "{2}\tofrom.ext" "tofrom"
  797. 13
  798. 8 3
  799. 5 1
  800. 6 3
  801. 18 0
  802. 11 00000285
  803. 0 27 8000
  804. 13
  805. 8 4
  806. 0 27 8001
  807. 13
  808. 8 5
  809. 16 TypeToFrom "{4}" "{5}"
  810. 10 00000351
  811. 5 -1
  812. 6 3
  813. 18 0
  814. 11 00000351
  815. 0 3 "Error finding the dialog box"
  816. 6 0
  817. 15
  818. 9
  819. 14 TypeToFrom
  820. 0 289 "Date"
  821. 2 165 1 2 66
  822. 0 6 "[13][13]"
  823. 0 289 "To"
  824. 0 6 "TO: {0}[13]"
  825. 0 289 "From"
  826. 0 6 "FROM: {1}[13]"
  827. 0 289 "Body Text"
  828. 0 6 "[13]"
  829. 6 2
  830. 15
  831. 9
  832. 00005796
  833.