home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0040 - 0049 / ibm0040-0049 / ibm0040.tar / ibm0040 / RITEWRIT.ZIP / RW_AMI.SMM < prev    next >
Encoding:
INI File  |  1991-09-26  |  7.1 KB  |  883 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     
  5. [files]
  6. [prn]
  7.     PostScript Printer
  8. [lang]
  9.     1
  10. [desc]
  11.     
  12.     
  13.     
  14.     
  15.     
  16.     683333355
  17.     17
  18.     683312469
  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.         Tms Rmn
  35.         240
  36.         0
  37.         49152
  38.     [algn]
  39.         225
  40.         1
  41.         0
  42.         0
  43.         0
  44.     [spc]
  45.         33
  46.         273
  47.         1
  48.         0
  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.         272
  78.         1
  79.         2
  80.         .
  81.         ,
  82.         $
  83. [tag]
  84.     Body Single
  85.     3
  86.     [fnt]
  87.         Tms Rmn
  88.         240
  89.         0
  90.         49152
  91.     [algn]
  92.         225
  93.         1
  94.         0
  95.         0
  96.         0
  97.     [spc]
  98.         33
  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.         272
  131.         1
  132.         2
  133.         .
  134.         ,
  135.         $
  136. [tag]
  137.     Bullet 1
  138.     4
  139.     [fnt]
  140.         Tms Rmn
  141.         240
  142.         0
  143.         49152
  144.     [algn]
  145.         1
  146.         1
  147.         720
  148.         360
  149.         360
  150.     [spc]
  151.         33
  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.         <*0>
  175.         360
  176.         1
  177.         1
  178.         0
  179.         0
  180.         0
  181.         0
  182.     [nfmt]
  183.         272
  184.         1
  185.         2
  186.         .
  187.         ,
  188.         $
  189. [tag]
  190.     Bullet 2
  191.     5
  192.     [fnt]
  193.         Tms Rmn
  194.         240
  195.         0
  196.         49152
  197.     [algn]
  198.         1
  199.         1
  200.         1080
  201.         360
  202.         360
  203.     [spc]
  204.         33
  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.         <*2>
  228.         360
  229.         1
  230.         1
  231.         0
  232.         0
  233.         0
  234.         0
  235.     [nfmt]
  236.         272
  237.         1
  238.         2
  239.         .
  240.         ,
  241.         $
  242. [tag]
  243.     Indent 1
  244.     6
  245.     [fnt]
  246.         Tms Rmn
  247.         240
  248.         0
  249.         49152
  250.     [algn]
  251.         193
  252.         1
  253.         1080
  254.         0
  255.         0
  256.     [spc]
  257.         33
  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.         
  281.         0
  282.         1
  283.         0
  284.         0
  285.         0
  286.         0
  287.         0
  288.     [nfmt]
  289.         272
  290.         1
  291.         2
  292.         .
  293.         ,
  294.         $
  295. [tag]
  296.     Indent 2
  297.     7
  298.     [fnt]
  299.         Tms Rmn
  300.         240
  301.         0
  302.         49152
  303.     [algn]
  304.         193
  305.         1
  306.         1440
  307.         0
  308.         0
  309.     [spc]
  310.         33
  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.         
  334.         0
  335.         1
  336.         0
  337.         0
  338.         0
  339.         0
  340.         0
  341.     [nfmt]
  342.         272
  343.         1
  344.         2
  345.         .
  346.         ,
  347.         $
  348. [tag]
  349.     Number List
  350.     8
  351.     [fnt]
  352.         Tms Rmn
  353.         240
  354.         0
  355.         49152
  356.     [algn]
  357.         1
  358.         1
  359.         720
  360.         360
  361.         360
  362.     [spc]
  363.         33
  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.         360
  388.         1
  389.         1
  390.         0
  391.         0
  392.         0
  393.         0
  394.     [nfmt]
  395.         272
  396.         1
  397.         2
  398.         .
  399.         ,
  400.         $
  401. [tag]
  402.     Bold & Center
  403.     9
  404.     [fnt]
  405.         Tms Rmn
  406.         240
  407.         0
  408.         49153
  409.     [algn]
  410.         228
  411.         1
  412.         0
  413.         0
  414.         0
  415.     [spc]
  416.         33
  417.         273
  418.         1
  419.         0
  420.         144
  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.         272
  449.         1
  450.         2
  451.         .
  452.         ,
  453.         $
  454. [tag]
  455.     First Indent
  456.     11
  457.     [fnt]
  458.         Tms Rmn
  459.         240
  460.         0
  461.         49152
  462.     [algn]
  463.         161
  464.         1
  465.         0
  466.         720
  467.         0
  468.     [spc]
  469.         33
  470.         273
  471.         1
  472.         144
  473.         0
  474.         1
  475.         100
  476.     [brk]
  477.         4
  478.     [line]
  479.         8
  480.         0
  481.         1
  482.         0
  483.         1
  484.         1
  485.         1
  486.         10
  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.         272
  502.         1
  503.         2
  504.         .
  505.         ,
  506.         $
  507. [tag]
  508.     Line Above
  509.     12
  510.     [fnt]
  511.         Tms Rmn
  512.         240
  513.         0
  514.         49152
  515.     [algn]
  516.         225
  517.         1
  518.         0
  519.         0
  520.         0
  521.     [spc]
  522.         33
  523.         273
  524.         1
  525.         288
  526.         0
  527.         1
  528.         100
  529.     [brk]
  530.         4
  531.     [line]
  532.         5
  533.         0
  534.         1
  535.         0
  536.         1
  537.         2
  538.         1
  539.         92
  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.         272
  555.         1
  556.         2
  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.         5
  582.         1
  583.         720
  584.         1
  585.         1440
  586.         1
  587.         2880
  588.         1
  589.         4320
  590.         1
  591.         5760
  592.     [hrght]
  593.     [lyfrm]
  594.         1
  595.         11200
  596.         0
  597.         0
  598.         12240
  599.         1440
  600.         1
  601.         1
  602.         3
  603.         1
  604.         0
  605.         0
  606.         0
  607.     [frmlay]
  608.         1440
  609.         12240
  610.         1
  611.         1440
  612.         72
  613.         1
  614.         360
  615.         1440
  616.         0
  617.         1
  618.         0
  619.         1
  620.         1
  621.         0
  622.         1
  623.         1440
  624.         10800
  625.         0
  626.     [txt]
  627.  
  628. >
  629.     [frght]
  630.     [lyfrm]
  631.         1
  632.         13248
  633.         0
  634.         14400
  635.         12240
  636.         15840
  637.         1
  638.         1
  639.         3
  640.         1
  641.         0
  642.         0
  643.         0
  644.     [frmlay]
  645.         15840
  646.         12240
  647.         1
  648.         1440
  649.         360
  650.         1
  651.         14472
  652.         1440
  653.         0
  654.         1
  655.         0
  656.         1
  657.         1
  658.         0
  659.         1
  660.         1440
  661.         10800
  662.         0
  663.     [txt]
  664. >
  665. [elay]
  666. [l1]
  667.     0
  668. [pg]
  669.     2
  670.     46 0 21 0 16384 1 0 65535 65535 Standard    0 0 0    0 0 0 0 0 0 0 65535 0 0 0 0 0 0
  671.     68 0 12 1025 16384 0 0 65535 65535 Standard    0 0 0    0 0 0 0 0 0 0 65535 0 0 0 0 0 0
  672. [edoc]
  673. FUNCTION INSTALL_RWW()
  674.  
  675.  
  676. FileName = GetProfileString$("AmiPro","macrodir")
  677.  
  678. FileName = strcat$(FileName,"\autoexec.smm")
  679.  
  680.  
  681. newFile = 0
  682.  
  683.  
  684. 'Open the Autoexec.SMM macro
  685.  
  686. result = FileOpen(FileName, AmiFile, "")
  687.  
  688. IF (result != 1)
  689.  
  690.     'The file doesn't appear to exist - try creating a new file
  691.  
  692.     result = New("~default.sty", 0)
  693.  
  694.     IF (result != 1)
  695.  
  696.         'Can't create a new file - give up
  697.  
  698.         Message("Can't set up RightWriter macros for Am<\m> Pro.")
  699.  
  700.         goto theend
  701.  
  702.     ENDIF
  703.  
  704.     newFile = 1
  705.  
  706. ENDIF
  707.  
  708.  
  709. IF (newFile = 1)
  710.  
  711.     'This is a new file
  712.  
  713.     'Need to put in a function start
  714.  
  715.     TYPE("Function InstallRWMenu()")
  716.  
  717.     TYPE("<[>Enter]<[>Enter]")
  718.  
  719. ELSE
  720.  
  721.     'This is an existing autoexec macro that already has a function in 
  722. it
  723.  
  724.     'Find the beginning of the function declaration and put our code 
  725. on the next line
  726.  
  727.     result = Replace(0,0,FindFromPage1,"Function","Function")
  728.  
  729.     IF (result = 1)
  730.  
  731.         'Found the start of the autoexec function - now go to the next line
  732.  
  733.         TYPE("<[>End]")
  734.  
  735.         TYPE("<[>Enter]<[>Enter]")
  736.  
  737.     ENDIF
  738.  
  739. ENDIF
  740.  
  741.  
  742. 'Put in the commands to add RightWriter menu items
  743.  
  744. TYPE("AddMenuItem(1, ""Too&ls"",""RightWriter Check &Document"",")
  745.  
  746. TYPE("""rwmacro.smm!CheckDoc"")")
  747.  
  748. TYPE("<[>Enter]")
  749.  
  750. TYPE("AddMenuItem(1, ""Too&ls"",""RightWriter Check &Selection"",")
  751.  
  752. TYPE("""rwmacro.smm!CheckSel"")")
  753.  
  754. TYPE("<[>Enter]<[>Enter]")
  755.  
  756. IF (newFile = 1)
  757.  
  758.     'Need to end the function
  759.  
  760.     TYPE("End Function")
  761.  
  762.     TYPE("<[>Enter]<[>Enter]")
  763.  
  764. ENDIF
  765.  
  766.  
  767. 'Save the Autoexec macro
  768.  
  769. IF (newFile = 1)
  770.  
  771.     'New file - save it as the autoexec file
  772.  
  773.     result = SaveAs(FileName, 0, 0)
  774.  
  775. ELSE
  776.  
  777.     'Existing file - save over the old one
  778.  
  779.     result = Save()
  780.  
  781. ENDIF
  782.  
  783.  
  784. IF (result != 1)
  785.  
  786.     Message("Can't set up RightWriter macros for Am<\m> Pro.")
  787.  
  788.     goto theend
  789.  
  790. ENDIF
  791.  
  792.  
  793. 'Now, quit AmiPro
  794.  
  795. ExitAmi()
  796.  
  797.  
  798. theend:
  799.  
  800. END FUNCTION
  801.  
  802. >
  803. [macsum] 1
  804. INSTALL_RWW 0 0 4 0
  805. [macse]
  806. 14 INSTALL_RWW
  807. 0 286 "AmiPro" "macrodir"
  808. 13
  809. 8 1
  810. 0 16 "{1}" "\autoexec.smm"
  811. 13
  812. 8 1
  813. 5 0
  814. 8 2
  815. 2 102 1 "{1}" 1 ""
  816. 13
  817. 8 3
  818. 6 3
  819. 5 1
  820. 18 1
  821. 11 00000299
  822. 2 101 1 "~default.sty" 0
  823. 13
  824. 8 3
  825. 6 3
  826. 5 1
  827. 18 1
  828. 11 00000289
  829. 0 3 "Can't set up RightWriter macros for Am<\m> Pro."
  830. 10 00000986
  831. 5 1
  832. 8 2
  833. 6 2
  834. 5 1
  835. 18 0
  836. 11 00000389
  837. 0 6 "Function InstallRWMenu()"
  838. 0 6 "[13][13]"
  839. 10 00000495
  840. 2 488 1 0 0 8192 "Function" "Function"
  841. 13
  842. 8 3
  843. 6 3
  844. 5 1
  845. 18 0
  846. 11 00000495
  847. 0 6 "[35]"
  848. 0 6 "[13][13]"
  849. 0 6 "AddMenuItem(1, ""Too&ls"",""RightWriter Check &Document"","
  850. 0 6 """rwmacro.smm!CheckDoc"")"
  851. 0 6 "[13]"
  852. 0 6 "AddMenuItem(1, ""Too&ls"",""RightWriter Check &Selection"","
  853. 0 6 """rwmacro.smm!CheckSel"")"
  854. 0 6 "[13][13]"
  855. 6 2
  856. 5 1
  857. 18 0
  858. 11 00000787
  859. 0 6 "End Function"
  860. 0 6 "[13][13]"
  861. 6 2
  862. 5 1
  863. 18 0
  864. 11 00000857
  865. 2 104 1 "{1}" 0 0
  866. 13
  867. 8 3
  868. 10 00000875
  869. 2 103 1
  870. 13
  871. 8 3
  872. 6 3
  873. 5 1
  874. 18 1
  875. 11 00000972
  876. 0 3 "Can't set up RightWriter macros for Am<\m> Pro."
  877. 10 00000986
  878. 26 274 -4000
  879. 6 0
  880. 15
  881. 9
  882. 00006243
  883.