home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / internet / yamtools20 / yamtools20english / yamtools.rexx < prev    next >
OS/2 REXX Batch file  |  1997-08-08  |  107KB  |  2,882 lines

  1. /******************************************************************************/
  2. /*                                                                            */
  3. /*                            YAMTOOLS                                        */
  4. /*                 Copyright ©1997 by Dick Whiting                            */
  5. /*                                                                            */
  6. /*----------------------------------------------------------------------------*/
  7. /*    This version requires MuiRexx 3.0 use Yamtools 1.7 with MuiRexx 2.2     */
  8. /*----------------------------------------------------------------------------*/
  9. /* Standard Disclaimer: I wrote it, it works for me, I don't guarantee        */
  10. /* that it will do anything productive for anyone else, etc. etc. ;-)         */
  11. /*                                                                            */
  12. /*HOWEVER, if you DO find a use for it: I homeschool my kids and they         */
  13. /*would love a postcard from where EVER you live.                             */
  14. /*                                                                            */
  15. /*Instant GEOGRAPHY lesson;)                                                  */
  16. /*                                                                            */
  17. /*                                                                            */
  18. /*POSTCARDS:    Dick Whiting                                                  */
  19. /*              28590 S. Beavercreek Rd.                                      */
  20. /*              Mulino, Oregon 97042                                          */
  21. /*              USA                                                           */
  22. /*                                                                            */
  23. /*----------------------------------------------------------------------------*/
  24. /*                                                                            */
  25. /*               Address Bug Reports or Comments to:                          */
  26. /*                Dick Whiting <dwhiting@europa.com>                          */
  27. /*                           15 June 1997                                     */
  28. /*                                                                            */
  29. /******************************************************************************/
  30. /*
  31. $VER: 2.0 Copyright ©1997 by Dick Whiting
  32. $AUTHOR: Dick Whiting
  33. $DESCRIPTION: MuiRexx 3.0 version Add-on Tools for Marcel Beck's wonderful YAM 
  34. */
  35.  
  36. options results
  37. options failat 21
  38.  
  39. subrtn=''
  40. parm=''
  41. rest=''
  42.  
  43. parse arg subrtn parm rest
  44.  
  45. progdir=pragma('D')
  46.  
  47. /**************************************************************************/
  48. /*                         Initialize Variables                           */
  49. /**************************************************************************/
  50. Call MUIvars                                /* go define vars for MUI use */
  51. Call YTvars                                 /* various values used in YT  */
  52. Call Helpvars                               /* pointers into HELP guide   */
  53. Call Localize                               /* vars for localizing strings*/
  54. Call Builtvars                              /* built using previous values*/
  55.  
  56. /**************************************************************************/
  57. /*                                                                        */
  58. /*                       Main Logic Routine                               */
  59. /*                                                                        */
  60. /**************************************************************************/
  61.  
  62. Address YAMTOOLS
  63.  
  64. Call CheckYam                               /* No YAM-no sense running    */
  65.  
  66. if subrtn~='' then do                       /* check vars nth time        */
  67.    getvar YAMTOOLSDEBUG                     /* see if we're debugging     */ 
  68.    debug=result
  69.    getvar YAMTOOLSROWS                      /* number of rows of buttons  */
  70.    Brows=result
  71.    getvar YAMTOOLSCOLS                      /* number of cols of buttons  */
  72.    Bcols=result
  73. end
  74.  
  75. if debug~=TRUE then debug=FALSE
  76.  
  77. if debug then say 'subrtn='subrtn 
  78. if debug then say 'parm='parm
  79. if debug then say 'rest='rest
  80.  
  81. Select
  82.    when subrtn=''   then do                 /* first time - setup window  */
  83.       Call LoadConfig                       /* load config or defaults    */
  84.       setvar YAMTOOLSROWS Brows             /* button rows for this run   */
  85.       setvar YAMTOOLSCOLS Bcols             /* button cols for this run   */
  86.       Call EnsureLibs                       /* make sure all libs present */
  87.       Call ValidateConfig                   /* check config options       */
  88.       if goodconfig then do                 /* found a valid config-use it*/ 
  89.          if ~delayload then do
  90.             Call GetArchList                /* get all folder info        */
  91.             Call ExpandAssigns              /* change assigns to vols     */ 
  92.             Call GetVolume                  /* change devs to vols        */
  93.             Call CheckArchs                 /* make sure all exist        */
  94.             Call LoadArchList               /* build & show folder list   */     
  95.             window ID YTINF CLOSE           /* close info window          */
  96.          end 
  97.          Call UpdateButtons                 /* update help for buttons    */
  98.       end
  99.       else do                               /* invalid or not found       */
  100.          group ID YTPGS REGISTER LABELS Cpage
  101.          errmsg=_text._badconfig
  102.          Call ErrorMsg 
  103.       end
  104.    end
  105.    when subrtn='RESCAN' then do             /* reload folder list         */
  106.       Call GetArchList                      /* get all folder info        */
  107.       Call ExpandAssigns                    /* change assigns to vols     */
  108.       Call GetVolume                        /* change devs to vols        */
  109.       Call CheckArchs                       /* make sure all exist        */
  110.       Call LoadArchList                     /* build & show folder list   */
  111.       window ID YTINF CLOSE                 /* close info window          */
  112.    end
  113.    when subrtn='READMAIL' then Call ReadMail         /* read selected mail*/  
  114.    when subrtn='BUTTON'   then Call DoRexxButton     /* execute a button  */
  115.    when subrtn='CONFIGEDIT' then Call ConfigEdit     /* modify config     */
  116.    when subrtn='ABOUT'  then Call AboutProgs         /* show About info   */
  117.    when subrtn='LISTMAIL' then Call ListMail         /* all mail in folder*/  
  118.    when subrtn='SEARCH' then Call SearchArchs        /* do the searches   */  
  119.    otherwise nop                                     /* never happen ;)   */
  120. end
  121.  
  122. exit
  123.  
  124. /******************************************************************************/
  125. /*                      MUIREXX WINDOW DEFINITION(S)                          */
  126. /******************************************************************************/
  127. BuildWindow:
  128.  
  129.    window ID YTWIN COMMAND '"quit"' PORT YAMTOOLS TITLE _title._main
  130.    if ~splitscreen then do
  131.        Call BuildMenu
  132.        Call BuildWin1
  133.        Call BuildWin2
  134.    end
  135.    else do
  136.       Call BuildMenu
  137.       Call BuildWin1
  138.       endwindow
  139.       Address YAMTOOLS
  140.       window ID YTWN2 COMMAND '"quit"' PORT YAMTOOLS TITLE _title._main
  141.       Call BuildMenu
  142.       Call BuildWin2
  143.    end
  144.  
  145. Return
  146.  
  147. BuildMenu:
  148.  
  149.    menu LABEL _label._project
  150.       menu LABEL _label._about
  151.          item COMMAND '"YamTools.rexx ABOUT YAMTOOLS"' LABEL 'YamTools'
  152.          item COMMAND '"YamTools.rexx ABOUT YAM"' LABEL 'YAM'
  153.          item COMMAND '"YamTools.rexx ABOUT MUIREXX"' LABEL 'MuiRexx'
  154.          item COMMAND '"method 'Application_AboutMUI' 0"' PORT YAMTOOLS LABEL 'MUI'
  155.          item COMMAND '"YamTools.rexx ABOUT TRANSLATE"' LABEL _label._translate
  156.       endmenu
  157.       item ATTRS MUIA_Menuitem_Title '-1'
  158.       item COMMAND '"YamTools.rexx CONFIGEDIT SAVE"' ATTRS MUIA_Menuitem_Shortcut 'S' LABEL _label._save
  159.       item COMMAND '"YamTools.rexx CONFIGEDIT SAVEAS"' ATTRS MUIA_Menuitem_Shortcut 'W' LABEL _label._saveas
  160.       item COMMAND '"YamTools.rexx CONFIGEDIT READ"' ATTRS MUIA_Menuitem_Shortcut 'O' LABEL _label._open 
  161.       item ATTRS MUIA_Menuitem_Title '-1'
  162.       item COMMAND '"quit"' PORT YAMTOOLS ATTRS MUIA_Menuitem_Shortcut 'Q' LABEL _label._quit
  163.    endmenu
  164.    menu LABEL _label._settings
  165.    if ~splitscreen then do
  166.       item COMMAND '"group ID YTPGS ATTRS' MUIA_ShowMe TRUE '"', 
  167.             MUIA_Menuitem_Shortcut 'P' PORT YAMTOOLS LABEL _label._showpage
  168.       item COMMAND '"group ID YTPGS REGISTER ATTRS' MUIA_ShowMe FALSE LABELS 'FLpage' '"', 
  169.             MUIA_Menuitem_Shortcut 'H' PORT YAMTOOLS LABEL _label._hidepage
  170.    end
  171.    else do
  172.       item COMMAND '"method ID YTWIN ' 0x8042554f'"', 
  173.             MUIA_Menuitem_Shortcut 'P' PORT YAMTOOLS LABEL _label._showpage
  174.       item COMMAND '"method ID YTWIN ' 0x8042152e'"', 
  175.             MUIA_Menuitem_Shortcut 'H' PORT YAMTOOLS LABEL _label._hidepage
  176.    end
  177.       item COMMAND '"method 'Application_OpenConfigWindow'"' PORT YAMTOOLS LABEL 'MUI...'
  178.  
  179.    endmenu
  180.  
  181. Return
  182.  
  183.  
  184. BuildWin1:
  185.  
  186.    group ID YTPGS REGISTER,
  187.          ATTRS MUIA_ShowMe showpages,
  188.          LABELS FLpage||','||MLpage||','||Cpage 
  189.  
  190. /* Folder List Page */
  191.       group 
  192.          group HORIZ
  193.             group
  194.                label DOUBLE _label._mdir
  195.             endgroup
  196.             group
  197.                text ID MDIR HELP help.MDIR NODE node.MDIR
  198.             endgroup
  199.          endgroup
  200.          group HORIZ MUIA_VertWeight 200 MUIA_HorizWeight 100
  201.             group 
  202.                list ID ALST TITLE _title._alst,
  203.                   COMMAND '"YamTools.rexx LISTMAIL %s"' HELP help.ALST NODE node.ALST,
  204.                   INSERT NODUP ATTRS MUIA_Listview_MultiSelect MUIV_Listview_MultiSelect_Shifted,
  205.                   MUIA_List_Format '"MAXWIDTH=75 MINWIDTH=-1 WEIGHT=75 P=\033l BAR,MAXWIDTH=25 MINWIDTH=-1 WEIGHT=25 P=\033r,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0"'
  206.                button ID ARLD COMMAND '"YamTools.rexx RESCAN"',
  207.                       HELP help.ARLD NODE node.ARLD LABEL _label._arld
  208.             endgroup
  209.             group FRAME MUIA_HorizWeight 100
  210.                label _label._search
  211.                group HORIZ
  212.                   group HORIZ
  213.                      group
  214.                         label DOUBLE _label._srcf
  215.                         label DOUBLE _label._srct
  216.                      endgroup
  217.                      group
  218.                         check ID SRCF HELP help.SRCF NODE node.SRCF,
  219.                               ATTRS MUIA_Selected FALSE
  220.                         check ID SRCT HELP help.SRCT NODE node.SRCT, 
  221.                               ATTRS MUIA_Selected FALSE
  222.                      endgroup
  223.                   endgroup
  224.                   group HORIZ
  225.                      group
  226.                         label DOUBLE _label._srcs
  227.                         label DOUBLE _label._srcm
  228.                      endgroup
  229.                      group
  230.                         check ID SRCS HELP help.SRCS NODE node.SRCS, 
  231.                               ATTRS MUIA_Selected FALSE
  232.                         check ID SRCM HELP help.SRCM NODE node.SRCM, 
  233.                               ATTRS MUIA_Selected FALSE
  234.                      endgroup
  235.                   endgroup
  236.                endgroup
  237.                group HORIZ
  238.                   label DOUBLE _label._srca
  239.                   check ID SRCA HELP help.SRCA NODE node.SRCA, 
  240.                         ATTRS MUIA_Selected TRUE 
  241.                endgroup
  242.                group 
  243.                   group HORIZ
  244.                      group
  245.                         radio ID SLOG HELP help.SLOG NODE node.SLOG,
  246.                               LABELS _label._slog
  247.                      endgroup
  248.                   endgroup
  249.                   group 
  250.                      space HORIZ 150
  251.                      label  _label._src1
  252.                      string ID SRC1 HELP help.SRC1 NODE node.SRC1, 
  253.                             ATTRS MUIA_CycleChain TRUE, 
  254.                             MUIA_String_AdvanceOnCR TRUE,        
  255.                             CONTENT ''
  256.                      string ID SRC2 HELP help.SRC2 NODE node.SRC2,
  257.                             ATTRS MUIA_CycleChain TRUE,
  258.                             MUIA_String_AdvanceOnCR TRUE,        
  259.                             CONTENT ''
  260.                      string ID SRC3 HELP help.SRC3 NODE node.SRC3,
  261.                             ATTRS MUIA_CycleChain TRUE,
  262.                             MUIA_String_AdvanceOnCR TRUE,        
  263.                             CONTENT ''
  264.                   endgroup
  265.                   group
  266.                      button ID SRCX HELP help.SRCX NODE node.SRCX,
  267.                             COMMAND '"YamTools.rexx SEARCH"', 
  268.                             ATTRS MUIA_CycleChain TRUE MUIA_Disabled FALSE,
  269.                             LABEL _label._srcx
  270.                   endgroup
  271.                endgroup
  272.             endgroup
  273.          endgroup
  274.       endgroup
  275.  
  276. /* Mail List Page */
  277.       group ATTRS MUIA_HorizWeight 100
  278.          list ID MLST COMMAND '"YamTools.rexx READMAIL %s"', 
  279.             HELP help.MLST NODE node.MLST,
  280.             TITLE _title._mlst,
  281.             INSERT NODUP ATTRS MUIA_Listview_MultiSelect MUIV_Listview_MultiSelect_Shifted,
  282.             MUIA_List_Format '"BAR,BAR,BAR,,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0"'
  283.       endgroup
  284.  
  285. /* Configuration Pages */
  286.       group 
  287.          group ID YTCON REGISTER LABELS Spage||','||Apage 
  288.             /* System configuration page */
  289.             group 
  290.                group FRAME HORIZ ATTRS MUIA_VertWeight 200
  291.                   group 
  292.                         label DOUBLE _label._cfgm
  293.                         label DOUBLE _label._cfgf
  294.                         label DOUBLE _label._cfgq
  295.                         label DOUBLE _label._cfgv
  296.                         label DOUBLE _label._cfge
  297.                         label DOUBLE _label._cfgx
  298.                             space 
  299.                   endgroup
  300.                   group 
  301.                         popasl ID CFGM HELP help.CFGM NODE node.CFGM,
  302.                             ATTRS MUIA_DrawersOnly TRUE,
  303.                             MUIA_CycleChain TRUE, 
  304.                             MUIA_String_AdvanceOnCR TRUE
  305.                         popasl ID CFGF HELP help.CFGF NODE node.CFGF,
  306.                             ATTRS MUIA_CycleChain TRUE, 
  307.                             MUIA_String_AdvanceOnCR TRUE
  308.                         popasl ID CFGQ HELP help.CFGQ NODE node.CFGQ,
  309.                             ATTRS MUIA_CycleChain TRUE, 
  310.                             MUIA_String_AdvanceOnCR TRUE
  311.                         popasl ID CFGV HELP help.CFGV NODE node.CFGV,
  312.                             ATTRS MUIA_CycleChain TRUE, 
  313.                             MUIA_String_AdvanceOnCR TRUE
  314.                         popasl ID CFGE HELP help.CFGE NODE node.CFGE,
  315.                             ATTRS MUIA_CycleChain TRUE, 
  316.                             MUIA_String_AdvanceOnCR TRUE
  317.                         popasl ID CFGX HELP help.CFGX NODE node.CFGX,
  318.                             ATTRS MUIA_CycleChain TRUE, 
  319.                             MUIA_String_AdvanceOnCR TRUE
  320.                             space 
  321.                   endgroup
  322.                endgroup
  323.                group FRAME HORIZ
  324.                   group HORIZ
  325.                      group
  326.                             label DOUBLE _label._cfgd
  327.                             label DOUBLE _label._cfgy
  328.                      endgroup
  329.                      group 
  330.                         check ID CFGD HELP help.CFGD NODE node.CFGD
  331.                         check ID CFGY HELP help.CFGY NODE node.CFGY
  332.                      endgroup
  333.                   endgroup
  334.                   group HORIZ
  335.                      group 
  336.                             label DOUBLE _label._cfgb
  337.                             label DOUBLE _label._cfgs
  338.                      endgroup
  339.                      group 
  340.                         check ID CFGB HELP help.CFGB NODE node.CFGB
  341.                         check ID CFGS HELP help.CFGS NODE node.CFGS
  342.                      endgroup
  343.                   endgroup
  344.                endgroup
  345.             endgroup
  346.  
  347.             /* ARexx button configuration page */
  348.             group
  349.                group HORIZ ATTRS MUIA_VertWeight 300
  350.                   group ATTRS MUIA_HorizWeight 300 
  351.                      list ID CLST TITLE _title._clst,
  352.                         HELP help.CLST NODE node.CLST,
  353.                         COMMAND '"YamTools.rexx CONFIGEDIT EDIT %s"',
  354.                         ATTRS MUIA_Listview_DragType MUIV_Listview_DragType_Immediate, 
  355.                            MUIA_List_ShowDropMarks TRUE,  
  356.                            MUIA_List_DragSortable TRUE,
  357.                            MUIA_Dropable TRUE,
  358.                            MUIA_List_Format '"BAR,BAR,"'
  359.                   endgroup
  360.                   group 
  361.                      button ID CFG7 COMMAND '"YamTools.rexx CONFIGEDIT CLEAR"',
  362.                             HELP help.CFG7 NODE node.CFG7  LABEL _label._cfg7
  363.                      button ID CFG9 COMMAND '"YamTools.rexx CONFIGEDIT UNDO"',
  364.                             HELP help.CFG9 NODE node.CFG9  LABEL _label._cfg9
  365.                      button ID CFGA COMMAND '"YamTools.rexx CONFIGEDIT AEDIT"',
  366.                             HELP help.CFGA NODE node.CFGA  LABEL _label._cfga
  367.                      space
  368.                   endgroup
  369.                endgroup
  370.                group FRAME
  371.                   group HORIZ
  372.                      group
  373.                         label DOUBLE _label._cfg1 
  374.                      endgroup
  375.                      group
  376.                         string ID CFG1 COMMAND '"YamTools.rexx CONFIGEDIT UPDATE"',
  377.                                HELP help.CFG1 NODE node.CFG1,
  378.                                ATTRS MUIA_CycleChain TRUE,
  379.                                MUIA_String_AdvanceOnCR TRUE,
  380.                                CONTENT ''
  381.                      endgroup
  382.                      group
  383.                         label DOUBLE _label._cfg2
  384.                      endgroup
  385.                      group
  386.                         cycle ID CFG2 COMMAND '"YamTools.rexx CONFIGEDIT UPDATE"', 
  387.                               HELP help.CFG2 NODE node.CFG2,
  388.                               ATTRS MUIA_CycleChain TRUE,                            
  389.                               MUIA_String_AdvanceOnCR TRUE,
  390.                               LABELS _label._cfg2cycle
  391.                      endgroup
  392.                   endgroup
  393.                   group HORIZ
  394.                      group
  395.                         label DOUBLE _label._cfg3
  396.                      endgroup   
  397.                      group
  398.                         popasl ID CFG3 COMMAND '"YamTools.rexx CONFIGEDIT UPDATE"', 
  399.                                HELP help.CFG3 NODE node.CFG3,
  400.                                ATTRS MUIA_CycleChain TRUE,
  401.                                MUIA_String_AdvanceOnCR TRUE,
  402.                                CONTENT progdir
  403.                      endgroup
  404.                      group
  405.                         label DOUBLE _label._cfgc
  406.                      endgroup
  407.                      group
  408.                         popslider ID CFGC HELP help.CFGC NODE node.CFGC,
  409.                         ATTRS MUIA_Numeric_Default bcols MUIA_Numeric_Max bcolmax MUIA_Numeric_Min 1
  410.                      endgroup
  411.                      group
  412.                         label DOUBLE _label._cfgr
  413.                      endgroup
  414.                      group
  415.                         popslider ID CFGR HELP help.CFGR NODE node.CFGR,
  416.                         ATTRS MUIA_Numeric_Default brows MUIA_Numeric_Max browmax MUIA_Numeric_Min 1
  417.                      endgroup
  418.                   endgroup   
  419.                endgroup 
  420.             endgroup 
  421.          endgroup
  422.          group FRAME HORIZ
  423.             button ID CFG4 COMMAND '"YamTools.rexx CONFIGEDIT SAVE"',
  424.                    HELP help.CFG4 NODE node.CFG4  LABEL _label._cfg4
  425.             button ID CFG5 COMMAND '"YamTools.rexx CONFIGEDIT USE"',
  426.                    HELP help.CFG5 NODE node.CFG5  LABEL _label._cfg5
  427.             button ID CFG6 COMMAND '"YamTools.rexx CONFIGEDIT RELOAD"',
  428.                    HELP help.CFG6 NODE node.CFG6  LABEL _label._cfg6
  429.          endgroup
  430.       endgroup
  431.    endgroup
  432.  
  433. Return
  434.  
  435. BuildWin2:
  436.  
  437. /* Command Buttons */
  438.    group FRAME scrollval ATTRS MUIA_Scrollgroup_FreeHoriz FALSE
  439.       group ATTRS MUIA_Group_Columns bcols
  440.       do i=1 to (Brows*Bcols)
  441.          bnum=right(i,3,'0')
  442.          bid='B'||right(i,3,'0')
  443.          button ID bid COMMAND '"YamTools.rexx BUTTON 'bnum '"'  HELP '"'help.B00'"' NODE node.B00
  444.       end
  445.       endgroup
  446.    endgroup
  447. endwindow
  448.  
  449. method ID SRCF  MUIM_Notify_Notify MUIA_Selected TRUE,
  450.       @SRCA 3   MUIM_Notify_Set MUIA_Selected FALSE
  451. method ID SRCT  MUIM_Notify_Notify MUIA_Selected TRUE,
  452.       @SRCA 3   MUIM_Notify_Set MUIA_Selected FALSE
  453. method ID SRCS  MUIM_Notify_Notify MUIA_Selected TRUE,
  454.       @SRCA 3   MUIM_Notify_Set MUIA_Selected FALSE
  455. method ID SRCM  MUIM_Notify_Notify MUIA_Selected TRUE,
  456.       @SRCA 3   MUIM_Notify_Set MUIA_Selected FALSE
  457.  
  458. method ID SRCA  MUIM_Notify_Notify MUIA_Selected TRUE,
  459.       @SRCF 3   MUIM_Notify_Set MUIA_Selected FALSE
  460. method ID SRCA  MUIM_Notify_Notify MUIA_Selected TRUE,
  461.       @SRCT 3   MUIM_Notify_Set MUIA_Selected FALSE
  462. method ID SRCA  MUIM_Notify_Notify MUIA_Selected TRUE,
  463.       @SRCS 3   MUIM_Notify_Set MUIA_Selected FALSE
  464. method ID SRCA  MUIM_Notify_Notify MUIA_Selected TRUE,
  465.       @SRCM 3   MUIM_Notify_Set MUIA_Selected FALSE
  466.  
  467. application ATTRS MUIA_Application_Author '"Dick Whiting"', 
  468.             MUIA_Application_Base '"YAMTOOLS"',
  469.             MUIA_Application_Copyright '"Copyright ©1997 by Dick Whiting"',
  470.             MUIA_Application_Description '" Add-On Tools For YAM"',
  471.             MUIA_Application_Title '"YamTools"',
  472.             MUIA_Application_Version '"Version 2.0"'
  473.  
  474. if ~showpages & splitscreen then do
  475.    method ID YTWIN MUIM_Window_ToBack
  476. end
  477.  
  478. Return
  479.  
  480. /**************************************************************************/
  481. /*              Make sure YAM is running & visible.                       */
  482. /**************************************************************************/
  483. CheckYAM:
  484.  
  485.    if ~show('p','YAM') then do
  486.       errmsg=_text._noyam
  487.       if subrtn='' then do
  488.          shutdown=TRUE
  489.       end
  490.       else do
  491.          shutdown=FALSE
  492.       end
  493.       Call ErrorMsg  
  494.    end
  495.  
  496.    Address YAM 'show'                       /* uniconify YAM's screen     */  
  497.  
  498.     Address YAM 'info SCREEN'                /* get YAM's screen           */
  499.     screen=result
  500.     if screen='' then screen='Workbench'
  501.  
  502. Return
  503.  
  504. /**************************************************************************/
  505. /*                                                                        */
  506. /*              Make sure that we have all the libs we need:              */
  507. /*                               RexxSupport                              */
  508. /*                               QuickSort                                */
  509. /*                                                                        */
  510. /**************************************************************************/
  511. EnsureLibs:
  512.  
  513.    if ~show('L','rexxsupport.library') then do
  514.       addlib('rexxsupport.library',0,-30)
  515.    end
  516.  
  517.    if ~show('P','QuickSortPort') then do
  518.       address Command "run >nil: "qsortprog
  519.       do i = 1 to 10
  520.          if ~show('P','QuickSortPort') then foo=delay(delaytm)
  521.          else leave i
  522.       end
  523.    end
  524.    if show('P','QuickSortPort') then do
  525.       call addlib('QuickSortPort',-30)
  526.    end
  527.    else do
  528.       errmsg=_text._noqsort
  529.       signal ErrorMsg
  530.    end
  531.  
  532. Return
  533.  
  534. /**************************************************************************/
  535. /*              Expand Assign Names for YAM folders                       */
  536. /*                                                                        */
  537. /*  FlashFind reports back on the volume:directory/subdir/file so to make */
  538. /*  sure we can accurately identify and match files, we'll change assigns */
  539. /*  to this format.                                                       */
  540. /*                                                                        */
  541. /**************************************************************************/
  542. ExpandAssigns:
  543.  
  544.    assign.=missing
  545.    assign.0=0
  546.  
  547.    assignfile='T:YTassigns.'||timestamp
  548.  
  549.    text ID MDIR 
  550.    maildir=result
  551.    if maildir='' then do
  552.       errmsg=_text._nomdir
  553.       signal ErrorMsg 
  554.    end
  555.  
  556.    Address Command "assign > "assignfile
  557.    foo=delay(delaytm*3)
  558.    goodopen=open('IN',assignfile,'R')
  559.    if goodopen then do 
  560.       do until eof('IN')
  561.          linein=readln('IN')
  562.          if pos('Directories:',linein)>0 then do
  563.             do until eof('IN') 
  564.                linein=readln('IN')
  565.                if linein='' then signal CloseAssign
  566.                assign.0=1+assign.0
  567.                aptr=assign.0
  568.                assign.aptr=word(linein,1)
  569.                avol=word(linein,2)
  570.                avol=translate(avol,'    ','<>[]')
  571.                avol=strip(avol)
  572.                assign.aptr.1=avol
  573.             end
  574.          end
  575.       end
  576.    end
  577.    else do 
  578.       errmsg=_text._badassign||assignfile  
  579.       Call ErrorMsg
  580.    end
  581.  
  582. CloseAssign:
  583.  
  584.    result=close('IN')
  585.  
  586.    if pos(':',maildir)>0 then do
  587.       testvol=substr(maildir,1,pos(':',maildir)-1)
  588.       restvol=substr(maildir,pos(':',maildir)+1)
  589.       do j=1 to assign.0
  590.          if upper(assign.j)=upper(testvol) then do 
  591.             maildir=assign.j.1
  592.             if right(maildir,1)~=':' then do 
  593.                if restvol~='' then maildir=maildir||'/'||restvol
  594.             end
  595.             leave j
  596.          end
  597.       end
  598.    end
  599.  
  600.    do i=1 to finfo.0
  601.       if pos(':',finfo.i.1.1)>0 then do
  602.          testvol=substr(finfo.i.1.1,1,pos(':',finfo.i.1.1)-1)
  603.          restvol=substr(finfo.i.1.1,pos(':',finfo.i.1.1)+1)
  604.          do j=1 to assign.0
  605.             if upper(assign.j)=upper(testvol) then do 
  606.                testvol=assign.j.1
  607.                if right(testvol,1)~=':' then do 
  608.                   if restvol~='' then testvol=testvol||'/'||restvol
  609.                end
  610.                finfo.i.1.1=testvol
  611.                leave j
  612.             end
  613.          end
  614.       end
  615.       else do
  616.          if right(maildir,1)=':' then finfo.i.1.1=maildir||finfo.i.1.1
  617.          else finfo.i.1.1=maildir||'/'||finfo.i.1.1
  618.       end
  619.    end
  620.  
  621.     if exists(assignfile) then do
  622.         Address Command 'Delete 'assignfile 'QUIET'
  623.    end
  624.  
  625. Return
  626.  
  627. /**************************************************************************/
  628. /*              Change DEV names to VOLUME names                          */
  629. /*                                                                        */
  630. /*  FlashFind reports back on the volume:directory/subdir/file so to make */
  631. /*  sure we can accurately identify and match files, we'll change device  */
  632. /*  names to volume names.                                                */
  633. /*                                                                        */
  634. /**************************************************************************/
  635. GetVolume:
  636.  
  637.    volume.=missing
  638.    volume.0=0
  639.  
  640.    volumefile='T:YTvolumes.'||timestamp
  641.  
  642.    Address Command "info > "volumefile
  643.    foo=delay(delaytm*3)
  644.    goodopen=open('IN',volumefile,'R')
  645.    if goodopen then do 
  646.       do until eof('IN')
  647.          linein=readln('IN')
  648.          if word(linein,1)='Unit' then do
  649.             do until eof('IN') 
  650.                linein=readln('IN')
  651.                if linein='' then signal CloseVolume
  652.                volume.0=1+volume.0
  653.                vptr=volume.0
  654.                volume.vptr=word(linein,1)
  655.                if words(linein)>=8 then do
  656.                   volume.vptr.1=subword(linein,8)
  657.                end
  658.             end
  659.          end
  660.       end
  661.    end
  662.    else do 
  663.       errmsg=_text._badvolfile||volumefile
  664.       Call ErrorMsg
  665.    end
  666.  
  667. CloseVolume:
  668.  
  669.    result=close('IN')
  670.  
  671.    do i=1 to finfo.0
  672.       if pos(':',finfo.i.1.1)>0 then do
  673.          testvol=substr(finfo.i.1.1,1,pos(':',finfo.i.1.1)-1)
  674.          restvol=substr(finfo.i.1.1,pos(':',finfo.i.1.1)+1)
  675.          do j=1 to volume.0
  676.             if upper(volume.j)=upper(testvol) then do 
  677.                testvol=volume.j.1
  678.                if right(testvol,1)~=':' then do 
  679.                   if restvol~='' then testvol=testvol||'/'||restvol
  680.                end
  681.                finfo.i.1.1=testvol
  682.                leave j
  683.             end
  684.          end
  685.       end
  686.       else do
  687.          if right(maildir,1)=':' then finfo.i.1.1=maildir||finfo.i.1.1
  688.          else finfo.i.1.1=maildir||'/'||finfo.i.1.1
  689.       end
  690.    end
  691.  
  692.     if exists(volumefile) then do
  693.         Address Command 'Delete 'volumefile 'QUIET'
  694.    end
  695.  
  696. Return
  697.  
  698. /******************************************************************************/
  699. /*                                                                            */
  700. /* Make sure that all of the folders actually exist as directories.           */
  701. /* They might NOT if the user sets the wrong MAILDIR: in the configuration.   */
  702. /*                                                                            */
  703. /******************************************************************************/
  704. CheckArchs:
  705.  
  706.    do i=1 to finfo.0
  707.       if ~exists(finfo.i.1.1) then do
  708.          errmsg=_text._badfolder
  709.          shutdown=FALSE
  710.          window ID YTINF CLOSE
  711.          Call ErrorMsg
  712.       end
  713.    end
  714.  
  715.  
  716. Return
  717.  
  718. /******************************************************************************/
  719. /*                                                                            */
  720. /* Ask YAM for each folder name, its number, and its path.                    */
  721. /* Remember to set folder back to original before leaving.                    */
  722. /*                                                                            */
  723. /******************************************************************************/
  724. GetArchList:
  725.  
  726.    infotext=_text._getfolders
  727.    infobuttons=''
  728.    showbusy=TRUE
  729.    Call InfoWindow
  730.  
  731.    check ID CFGY
  732.    loadslow=result
  733.  
  734.    if loadslow then do
  735.       Address YAM 'getfolderinfo number'
  736.       origfolder=result
  737.       idx=0
  738.       emptycnt=0                             /* allow for 5 deleted in a row */
  739.       Do i=0 to maxarchs
  740.          Address YAM 'setfolder ' i
  741.          sfrc=rc
  742.          if sfrc=0 then do
  743.             idx=idx+1
  744.             Address YAM 'getfolderinfo number'
  745.             finfo.idx=result
  746.             Address YAM 'getfolderinfo name'
  747.             finfo.idx.1=result
  748.             /* say 'i='i 'idx='idx 'folder number='finfo.idx 'name='finfo.idx.1 */
  749.             Address YAM 'getfolderinfo path'
  750.             finfo.idx.1.1=result
  751.             Address YAM 'getfolderinfo max'
  752.             finfo.idx.1.1.1=result
  753.             emptycnt=0
  754.          end
  755.          else do
  756.           /*  say 'i='i 'idx='idx 'sfrc='sfrc 'emptycnt='emptycnt */
  757.             emptycnt=emptycnt+1
  758.             if emptycnt>=emptymax then leave i
  759.          end
  760.       end
  761.       finfo.0=idx
  762.       Address YAM 'setfolder ' origfolder
  763.    end
  764.    else do
  765.       popasl ID CFGX
  766.       yamconfig=result
  767.       if result~='' then do
  768.          idx=0
  769.          if open('IN',yamconfig,'R') then do
  770.             do until eof('IN')
  771.                linein=readln('IN')
  772.                parse var linein yamopt '=' yamval
  773.                if pos('FOLDER',upper(yamopt))=1 then do
  774.                   idx=idx+1
  775.                   finfo.idx=substr(yamopt,7)+0  /* folder number forced to numeric */
  776.                   parse var yamval ftype ';' fsort ';' fpath ';' fname 
  777.                   finfo.idx.1=fname
  778.                   finfo.idx.1.1=fpath
  779.                   finfo.idx.1.1.1='?'
  780.                end
  781.             end
  782.             finfo.0=idx
  783.             foo=close('IN')
  784.          end
  785.       end
  786.    end
  787.  
  788. Return
  789.  
  790. /******************************************************************************/
  791. /*                      Read Config File                                      */
  792. /* If the config file is not found then use internal defaults, force user to  */
  793. /* config page, and pop up message to edit and save. If the default config    */
  794. /* file is found then use it and scan archive list. Save the name as a var    */
  795. /* whenever a new file is loaded for reference by future SAVE,RELOAD cmds.    */
  796. /*                                                                            */
  797. /******************************************************************************/
  798. LoadConfig:
  799.  
  800.    if debug then say 'entered LoadConfig parm='parm
  801.  
  802.    if parm='' then configfile='YamTools.config'
  803.               else configfile=parm 
  804.  
  805.    setvar YAMTOOLSCONFIG configfile
  806.  
  807.    config.=missing
  808.    config.0=0
  809.    goodconfig=TRUE
  810.    maildir=missing
  811.    scanprog=missing
  812.    qsortprog=missing
  813.    viewer=missing
  814.    vieweropts=''
  815.    editor=''
  816.    brows=missing
  817.    bcols=missing
  818.    scrollval=''
  819.    delayload=TRUE
  820.    yamconfig=''
  821.    yamload=TRUE
  822.    showpages=TRUE
  823.    splitscreen=FALSE
  824.  
  825.    goodopen=open('IN',configfile,'R')
  826.    if goodopen then do 
  827.       linein=readln('IN')
  828.       if linein~=configheader then do
  829.          infomsg=_text._notconfig
  830.          Call InfoMsg
  831.          result=close('IN')
  832.          goodconfig=FALSE
  833.          getvar OLDYTCONFIG 
  834.          configfile=result
  835.          setvar YAMTOOLSCONFIG configfile
  836.          signal LoadConfigEnd
  837.       end
  838.       do until eof('IN')
  839.          linein=readln('IN')
  840.          linein=strip(linein)
  841.          select 
  842.             when substr(linein,1,2)='/*' then iterate
  843.             when linein='' then iterate
  844.             when upper(word(linein,1))='BROWS' then do 
  845.                Brows=word(linein,2)
  846.                if Brows>1 then scrollval='SCROLL'
  847.             end
  848.             when upper(word(linein,1))='BCOLS' then Bcols=word(linein,2)
  849.             when upper(word(linein,1))='MAILDIR' then maildir=word(linein,2)
  850.             when upper(word(linein,1))='SCANPROG' then scanprog=word(linein,2)
  851.             when upper(word(linein,1))='QSORTPROG' then qsortprog=word(linein,2)
  852.             when upper(word(linein,1))='VIEWER' then viewer=subword(linein,2)
  853.             when upper(word(linein,1))='EDITOR' then editor=subword(linein,2)
  854.             when upper(word(linein,1))='DELAYLOAD' then delayload=word(linein,2)
  855.             when upper(word(linein,1))='YAMCONFIG' then yamconfig=word(linein,2)
  856.             when upper(word(linein,1))='YAMLOAD' then yamload=word(linein,2)
  857.             when upper(word(linein,1))='SHOWPAGES' then showpages=word(linein,2)
  858.             when upper(word(linein,1))='SPLITSCREEN' then splitscreen=word(linein,2)
  859.             otherwise do
  860.                config.0=1+config.0
  861.                cptr=config.0
  862.                parse var linein config.cptr ',' config.cptr.1 ',' config.cptr.1.1 
  863.             end
  864.          end
  865.       end
  866.       result=close('IN')
  867.    end
  868.    else do 
  869.       Brows=3
  870.       Bcols=6
  871.       scrollval='SCROLL'
  872.       maildir='YAM:'
  873.       scanprog='C:FlashFind'
  874.       qsortprog='SYS:Rexxc/QuickSort'
  875.       viewer='sys:Utilities/multiview %f PUBSCREEN=%s'
  876.       Call BuildWindow
  877.       text   ID MDIR LABEL   maildir
  878.       popasl ID CFGM CONTENT maildir
  879.       popasl ID CFGF CONTENT scanprog
  880.       popasl ID CFGQ CONTENT qsortprog
  881.       popasl ID CFGV CONTENT viewer
  882.       check ID CFGD ATTRS MUIA_Selected delayload
  883.       check ID CFGY ATTRS MUIA_Selected yamload
  884.       check ID CFGB ATTRS MUIA_Selected showpages
  885.       check ID CFGS ATTRS MUIA_Selected splitscreen
  886.       do i=0 to (Brows*Bcols)-1
  887.          list ID CLST INSERT POS MUIV_List_Insert_Bottom STRING emptyconfig
  888.       end 
  889.       list ID CLST POS MUIV_List_Insert_Top STRING emptyconfig
  890.       goodconfig=FALSE
  891.       signal LoadConfigEnd
  892.    end
  893.  
  894.    if Brows=missing then Brows=3
  895.    if Bcols=missing then Bcols=6
  896.  
  897.    Call BuildWindow
  898.  
  899.    if maildir=missing then do
  900.       maildir='YAM:'
  901.       text   ID MDIR LABEL   maildir
  902.       popasl ID CFGM CONTENT maildir     
  903.       goodconfig=FALSE
  904.    end   
  905.    else do
  906.       text   ID MDIR LABEL   maildir
  907.       popasl ID CFGM CONTENT maildir     
  908.    end
  909.  
  910.    if scanprog=missing then do
  911.       scanprog='C:FlashFind'
  912.       popasl ID CFGF CONTENT scanprog
  913.       goodconfig=FALSE
  914.    end
  915.    else do
  916.       popasl ID CFGF CONTENT scanprog
  917.    end
  918.  
  919.    if qsortprog=missing then do
  920.       qsortprog='SYS:Rexxc/QuickSort'
  921.       popasl ID CFGQ CONTENT qsortprog
  922.       goodconfig=FALSE
  923.    end
  924.    else do
  925.       popasl ID CFGQ CONTENT qsortprog
  926.    end
  927.  
  928.    if viewer=missing then do
  929.       viewer='sys:Utilities/multiview %f PUBSCREEN=%s'
  930.       popasl ID CFGV CONTENT viewer
  931.       goodconfig=FALSE
  932.    end
  933.    else do
  934.       popasl ID CFGV CONTENT viewer
  935.    end
  936.  
  937.    popasl ID CFGE CONTENT editor
  938.  
  939.    popasl ID CFGX CONTENT yamconfig
  940.  
  941.    check ID CFGD ATTRS MUIA_Selected delayload
  942.    check ID CFGY ATTRS MUIA_Selected yamload
  943.    check ID CFGB ATTRS MUIA_Selected showpages
  944.    check ID CFGS ATTRS MUIA_Selected splitscreen
  945.  
  946.    do i=1 to config.0
  947.       if i> Brows*Bcols then do
  948.          infomsg=_text._extrabuttons
  949.          Call InfoMsg 
  950.          goodconfig=FALSE
  951.          signal LoadConfigEnd
  952.       end
  953.       j=i-1
  954.       liststr=config.i||comma||config.i.1||comma||config.i.1.1
  955.       list ID CLST POS j STRING liststr         
  956.       bname=config.i
  957.       if bname='empty' then bname='' 
  958.       bnum='B'||right(i,3,'0')
  959.       button ID bnum LABEL bname
  960.    end 
  961.  
  962.    k=i                                      /* copy counter               */
  963.    do i=k to Brows*Bcols                    /* fill any empty slots       */
  964.       j=i-1
  965.       list ID CLST INSERT POS j STRING emptyconfig
  966.    end
  967.  
  968.    list ID CLST POS MUIV_List_Insert_Top
  969.    liststr=result
  970.    list ID CLST POS MUIV_List_Insert_Top STRING liststr
  971.  
  972. LoadConfigEnd:
  973.  
  974. Return
  975.  
  976. /******************************************************************************/
  977. /*                      Edit Config Options                                   */
  978. /*                                                                            */
  979. /* Handle changing of ARexx command buttons, mail directory, flashfind, and   */
  980. /* qsort locations. Process SAVE,USE,RELOAD,CLEAR and a single level of UNDO. */
  981. /*                                                                            */
  982. /******************************************************************************/
  983. ConfigEdit:
  984.  
  985.    if debug then say 'entered ConfigEdit'
  986.    if debug then say 'parm='parm
  987.  
  988.    list ID CLST MUIA_List_Active
  989.    cpos=result
  990.    if debug then say 'cpos='cpos
  991.  
  992.    string ID CFG1
  993.    cfgS1=result
  994.    
  995.    cycle ID CFG2
  996.    cfgS2=result
  997.  
  998.    popasl ID CFG3
  999.    cfgS3=result
  1000.  
  1001.    select
  1002.       when parm='UPDATE' then do
  1003.         liststr=cfgS1||comma||cfgS2||comma||cfgS3
  1004.         list ID CLST POS cpos STRING liststr
  1005.       end 
  1006.       when parm='EDIT' then do
  1007.          parse var rest oldcfgS1 ',' oldcfgS2 ',' oldcfgS3
  1008.          oldcfgS1=strip(oldcfgS1)
  1009.          oldcfgS2=strip(oldcfgS2)
  1010.          oldcfgS3=strip(oldcfgS3)
  1011.          liststr='"'||oldcfgS1||comma||oldcfgS2||comma||oldcfgs3||'"'
  1012.          setvar ytoldcfg liststr
  1013.          if substr(oldcfgS1,1,5)='empty' then oldcfgs1=''
  1014.          string ID CFG1 CONTENT oldcfgS1 
  1015.          if oldcfgS2='none' then oldcfgs2=''
  1016.          cycle ID CFG2 LABELS oldcfgS2 
  1017.          if pos('--available--',oldcfgS3)>0 then oldcfgS3=progdir
  1018.          popasl ID CFG3 CONTENT oldcfgS3
  1019.       end
  1020.       when parm='CLEAR' then do
  1021.         list ID CLST POS cpos STRING emptyconfig
  1022.       end 
  1023.       when parm='USE' then do
  1024.            Call ValidateConfig
  1025.            Call UpdateButtons
  1026.            Call EnsureLibs
  1027.       end 
  1028.       when parm='SAVE' then do
  1029.            Call ValidateConfig
  1030.            Call UpdateButtons
  1031.            Call SaveConfig
  1032.            Call EnsureLibs
  1033.       end 
  1034.       when parm='SAVEAS' then do
  1035.            Call AskConfig
  1036.            Call ValidateConfig
  1037.            Call UpdateButtons
  1038.            Call SaveConfig
  1039.            Call EnsureLibs
  1040.       end 
  1041.       when parm='RELOAD' then do
  1042.            getvar YAMTOOLSCONFIG 
  1043.            parm=result   
  1044.            Call LoadConfig
  1045.            Call ShowConfig
  1046.            Call ValidateConfig
  1047.            Call EnsureLibs
  1048.       end 
  1049.       when parm='READ' then do
  1050.            Call AskConfig
  1051.            getvar YAMTOOLSCONFIG 
  1052.            parm=result   
  1053.            Call LoadConfig
  1054.            Call ShowConfig
  1055.            Call ValidateConfig
  1056.            Call EnsureLibs
  1057.       end 
  1058.       when parm='UNDO' then do
  1059.          getvar ytoldcfg
  1060.          oldcfg=result
  1061.          parse var oldcfg oldcfgS1 ',' oldcfgS2 ',' oldcfgS3
  1062.          liststr=oldcfgS1||comma||oldcfgS2||comma||oldcfgS3
  1063.          list ID CLST POS cpos STRING liststr
  1064.       end 
  1065.       when parm='AEDIT' then do
  1066.          popasl ID CFGE
  1067.          editor=result
  1068.          if editor=''then do
  1069.             errmsg=_text._noeditor        
  1070.             Call ErrorMsg 
  1071.          end
  1072.          list ID CLST POS cpos
  1073.          liststr=result
  1074.          parse var liststr oldcfgS1 ',' oldcfgS2 ',' mpath
  1075.          if ~exists(mpath) then do
  1076.             errmsg=mpath||_text._badarexx
  1077.             Call ErrorMsg 
  1078.          end
  1079.             fpos=pos('%F',editor)
  1080.          if fpos>0 then do
  1081.                 editor=delstr(editor,fpos,2)
  1082.             editor=insert(mpath,editor,fpos-1)
  1083.          end
  1084.             spos=pos('%S',editor)
  1085.          if spos>0 then do
  1086.                 editor=delstr(editor,spos,2)
  1087.             editor=insert(screen,editor,spos-1)
  1088.          end
  1089.           Address Command editor
  1090.       end
  1091.       otherwise do
  1092.          if debug then say 'otherwise in CONFIGEDIT'
  1093.       end
  1094.    end  
  1095.  
  1096. Return
  1097.  
  1098. /**************************************************************************/
  1099. /*                     Force CONFIG screen to be shown                    */
  1100. /**************************************************************************/
  1101. ShowConfig:
  1102.  
  1103.    check ID CFGS
  1104.    splitscreen=result
  1105.  
  1106.    if ~splitscreen then do
  1107.       group ID YTPGS ATTRS MUIA_ShowMe TRUE
  1108.    end
  1109.    else do
  1110.       method ID YTWIN MUIM_Window_ToFront
  1111.    end
  1112.  
  1113. Return
  1114.  
  1115. /******************************************************************************/
  1116. /*                                                                            */
  1117. /* Ask user for name of configuration file to either READ or SAVEAS           */
  1118. /*                                                                            */
  1119. /******************************************************************************/
  1120. AskConfig:   
  1121.  
  1122.    getvar YAMTOOLSCONFIG 
  1123.    configfile=result   
  1124.    setvar OLDYTCONFIG configfile
  1125.  
  1126.    select
  1127.       when lastpos('/',configfile)>0 then do
  1128.          figfile=substr(configfile,lastpos('/',configfile)+1)
  1129.          figdir=substr(configfile,1,lastpos('/',configfile)-1)
  1130.       end
  1131.       when lastpos(':',configfile)>0 then do
  1132.          figfile=substr(configfile,lastpos(':',configfile)+1)
  1133.          figdir=substr(configfile,1,lastpos(':',configfile)-1)
  1134.       end
  1135.       otherwise do
  1136.          figfile='YamTools.config'
  1137.          figdir=progdir
  1138.       end
  1139.    end
  1140.  
  1141.    aslrequest ID YTWIN TITLE '"Select File"',
  1142.               ATTRS ASLFR_InitialDrawer figdir ASLFR_InitialFile figfile 
  1143.    if rc = 0 then do
  1144.       configfile=result
  1145.       setvar YAMTOOLSCONFIG configfile
  1146.       if debug then say 'Configfile from ASLFR='configfile
  1147.    end
  1148.  
  1149.  
  1150. Return
  1151.  
  1152. /******************************************************************************/
  1153. /*                                                                            */
  1154. /* SAVE configuration file to file pointed at by the MuiRexx YAMTOOLSCONFIG   */
  1155. /* variable. Very simple format for config file.                              */
  1156. /*                                                                            */
  1157. /******************************************************************************/
  1158. SaveConfig:   
  1159.  
  1160.    list ID CLST MUIA_List_Active
  1161.    cpos=result
  1162.  
  1163.    getvar YAMTOOLSCONFIG 
  1164.    configfile=result   
  1165.  
  1166.    goodopen=open('OUT',configfile,'W')
  1167.    if goodopen then do 
  1168.       foo=writeln('OUT',configheader)
  1169.       popasl ID CFGM
  1170.       maildir=result
  1171.       text   ID MDIR LABEL   maildir
  1172.       liststr='MAILDIR'||' '||maildir
  1173.       foo=writeln('OUT',liststr)       
  1174.       popasl ID CFGF 
  1175.       scanprog=result
  1176.       liststr='SCANPROG'||' '||scanprog
  1177.       foo=writeln('OUT',liststr)       
  1178.       popasl ID CFGQ
  1179.       qsortprog=result
  1180.       liststr='QSORTPROG'||' '||qsortprog
  1181.       foo=writeln('OUT',liststr)       
  1182.  
  1183.       popasl ID CFGV
  1184.       viewer=result
  1185.       liststr='VIEWER'||' '||viewer
  1186.       foo=writeln('OUT',liststr)       
  1187.  
  1188.       popasl ID CFGE
  1189.       editor=result
  1190.       liststr='EDITOR'||' '||editor
  1191.       foo=writeln('OUT',liststr)       
  1192.  
  1193.       popasl ID CFGX
  1194.       yamconfig=result
  1195.       liststr='YAMCONFIG'||' '||yamconfig
  1196.       foo=writeln('OUT',liststr)       
  1197.  
  1198.       check ID CFGD
  1199.       delayload=result
  1200.       liststr='DELAYLOAD'||' '||delayload
  1201.       foo=writeln('OUT',liststr)       
  1202.       check ID CFGY
  1203.       yamload=result
  1204.       liststr='YAMLOAD'||' '||yamload
  1205.       foo=writeln('OUT',liststr)       
  1206.  
  1207.       check ID CFGB
  1208.       showpages=result
  1209.       liststr='SHOWPAGES'||' '||showpages
  1210.       foo=writeln('OUT',liststr)       
  1211.       check ID CFGS
  1212.       splitscreen=result
  1213.       liststr='SPLITSCREEN'||' '||splitscreen
  1214.       foo=writeln('OUT',liststr)       
  1215.       
  1216.       popslider ID CFGR
  1217.       xrows=result
  1218.       liststr='BROWS'||' '||xrows
  1219.       foo=writeln('OUT',liststr)       
  1220.       popslider ID CFGC
  1221.       xcols=result
  1222.       liststr='BCOLS'||' '||xcols
  1223.       foo=writeln('OUT',liststr)       
  1224.       do i=0 to (Brows*Bcols)-1
  1225.          j=i+1
  1226.          list ID CLST POS i
  1227.          oldcfg=result
  1228.          parse var oldcfg oldcfgS1 ',' oldcfgS2 ',' oldcfgS3
  1229.          liststr=oldcfgS1||comma||oldcfgS2||comma||oldcfgS3
  1230.          foo=writeln('OUT',liststr)
  1231.       end
  1232.       result=close('OUT')
  1233.    end
  1234.    else do
  1235.       errmsg=_text._opencfgerr
  1236.       Call ErrorMsg 
  1237.    end
  1238.  
  1239.    list ID CLST POS cpos
  1240.  
  1241. Return
  1242.  
  1243. /******************************************************************************/
  1244. /*                                                                            */
  1245. /* Validate ALL of the Configuration information.                             */
  1246. /*                                                                            */
  1247. /******************************************************************************/
  1248. ValidateConfig:
  1249.  
  1250.    popasl ID CFGM
  1251.    maildir=result
  1252.     if right(maildir,1)='/' then do
  1253.         maildir=substr(maildir,1,length(maildir)-1)
  1254.     end
  1255.  
  1256.    if ~exists(maildir) then do
  1257.       goodconfig=FALSE
  1258.       badpage=Spage
  1259.       errmsg=maildir||_text._badmdir
  1260.       Call Errormsg
  1261.    end
  1262.    text   ID MDIR LABEL   maildir
  1263.     popasl ID CFGM CONTENT maildir 
  1264.  
  1265.    popasl ID CFGF 
  1266.    scanprog=result
  1267.    if ~exists(scanprog) then do
  1268.       goodconfig=FALSE
  1269.       badpage=Spage
  1270.       errmsg=scanprog||_text._badscan
  1271.       Call Errormsg
  1272.    end
  1273.    
  1274.    popasl ID CFGQ
  1275.    qsortprog=result
  1276.    if ~exists(qsortprog) then do
  1277.       goodconfig=FALSE
  1278.       badpage=Spage
  1279.       errmsg=qsortprog||_text._badqsort
  1280.       Call Errormsg
  1281.    end
  1282.  
  1283.    popasl ID CFGV
  1284.    viewer=upper(result)
  1285.    if viewer~='YAM' & viewer~='YAMTOOLS' then do
  1286.       vieweropts=subword(viewer,2)
  1287.       viewer=word(viewer,1)
  1288.       if ~exists(viewer) then do
  1289.          goodconfig=FALSE
  1290.          badpage=Spage
  1291.          errmsg=viewer||_text._badviewer
  1292.          Call Errormsg
  1293.       end
  1294.    end
  1295.  
  1296.    popasl ID CFGE
  1297.    editor=upper(result)
  1298.    if editor~='' then do
  1299.       editoropts=subword(editor,2)
  1300.       editor=word(editor,1)
  1301.       if ~exists(editor) then do
  1302.          goodconfig=FALSE
  1303.          badpage=Spage
  1304.          errmsg=editor||_text._badeditor
  1305.          Call Errormsg
  1306.       end
  1307.    end
  1308.  
  1309.    popasl ID CFGX
  1310.    yamconfig=upper(result)
  1311.    if yamconfig~='' then do
  1312.       if ~exists(yamconfig) then do
  1313.          goodconfig=FALSE
  1314.          badpage=Spage
  1315.          errmsg=yamconfig||_text._badyamconfig
  1316.          Call Errormsg
  1317.       end
  1318.    end
  1319.  
  1320.    check ID CFGY
  1321.    loadslow=result
  1322.    if yamconfig='' & ~loadslow then do
  1323.       goodconfig=FALSE
  1324.       badpage=Spage
  1325.       errmsg=_text._noyamconfig
  1326.       Call Errormsg
  1327.    end
  1328.  
  1329.    do i=0 to (Brows*Bcols)-1
  1330.       list ID CLST POS i
  1331.       oldcfg=result
  1332.       parse var oldcfg blabel ',' ptype ',' rexxprog
  1333.       if blabel='empty' then iterate
  1334.       if ~exists(rexxprog) then do
  1335.          goodconfig=FALSE
  1336.          badpage=Apage
  1337.          errmsg=rexxprog||_text._badarexx
  1338.          Call Errormsg
  1339.       end
  1340.       if blabel='' then do
  1341.          goodconfig=FALSE
  1342.          badpage=Apage
  1343.          errmsg=_text._nolabel||rexxprog
  1344.          Call Errormsg
  1345.       end
  1346.    end
  1347.  
  1348. Return
  1349.  
  1350. /******************************************************************************/
  1351. /*                                                                            */
  1352. /* Update the labels on the ARexx command buttons to match the current config.*/
  1353. /*                                                                            */
  1354. /******************************************************************************/
  1355. UpdateButtons:
  1356.  
  1357.    list ID CLST MUIA_List_Active
  1358.    cpos=result
  1359.    nl='\n'
  1360.  
  1361.    do i=0 to (Brows*Bcols)-1
  1362.       j=i+1
  1363.       list ID CLST POS i
  1364.       liststr=result
  1365.       parse var liststr blabel ',' btype ',' bprog
  1366.       if blabel='empty' then blabel=''
  1367.       bid='B'||right(j,3,'0')
  1368.       if blabel='' then helpstr=help.B00
  1369.                    else helpstr='"'||_text._execute||bprog||nl||_text._astype||btype||'"'
  1370.  
  1371.       button ID bid LABEL blabel 
  1372.       button ID bid ATTRS MUIA_ShortHelp helpstr
  1373.    end
  1374.  
  1375.    list ID CLST POS cpos
  1376.  
  1377. Return
  1378.  
  1379. /******************************************************************************/
  1380. /*                                                                            */
  1381. /* Load the Folder List on page 1 of the YAMTOOLS window.                     */
  1382. /*                                                                            */
  1383. /******************************************************************************/
  1384. LoadArchList:
  1385.  
  1386.    list ID ALST ATTRS MUIA_List_Quiet TRUE
  1387.     method ID ALST MUIM_List_Clear
  1388.  
  1389.    do i=1 to finfo.0
  1390.       liststr=finfo.i.1||comma||finfo.i.1.1.1||comma||finfo.i.1.1||comma||finfo.i
  1391.       list ID ALST INSERT POS MUIV_List_Insert_Bottom STRING liststr
  1392.    end
  1393.  
  1394.    list ID ALST ATTRS MUIA_List_Quiet FALSE
  1395.  
  1396. Return
  1397.  
  1398. /******************************************************************************/
  1399. /*  Create mail list of all mail in folder.                                   */
  1400. /******************************************************************************/
  1401. ListMail:
  1402.  
  1403.    if debug then say 'Entered ListMail:'
  1404.    aline=parm||rest
  1405.    if debug then say aline
  1406.    parse var aline arch ',' size ',' afile ',' anum ',' rest
  1407.    if debug then say '  arch='arch 
  1408.    if debug then say '  size='size
  1409.    if debug then say '  anum='anum 
  1410.    if debug then say '  afile='afile
  1411.    Address YAM "setfolder" anum
  1412.    Address YAM "getfolderinfo max"
  1413.    size=result
  1414.  
  1415.    list ID MLST ATTRS MUIA_List_Entries
  1416.    mcnt=result
  1417.    if debug then say 'mcnt='mcnt
  1418.  
  1419.    if debug then say 'Clearing Mail List '
  1420.    
  1421.    infotext=_text._loadmail
  1422.    infobuttons=_text._squit1||comma||_text._squit2||comma||_text._squit3
  1423.    showbusy=TRUE
  1424.  
  1425.    Call InfoWindow
  1426.  
  1427.     method ID MLST MUIM_List_Clear
  1428.  
  1429.    do i=0 to size-1
  1430.       mnum=i
  1431.       Address YAM "setmail" mnum
  1432.       Address YAM "getmailinfo file"
  1433.       mpath=result
  1434.       file=substr(mpath,lastpos('/',mpath)+1)   /* just the filename part*/
  1435.       Address YAM "getmailinfo from"
  1436.       from=result
  1437.       if pos('<',from)>1 then from=substr(from,1,pos('<',from)-1)
  1438.       from=translate(from,' ',',')
  1439.       Address YAM "getmailinfo subject"
  1440.       subj=result
  1441.       subj=translate(subj,' ',',') 
  1442.       Address YAM "getmailinfo to"
  1443.       mfor=result
  1444.       mfor=translate(mfor,' ',',')
  1445.       liststr=arch||comma||from||comma||subj||comma||mfor||comma||mnum||comma||anum||comma||file
  1446.       if debug then say liststr
  1447.       list ID MLST INSERT POS MUIV_List_Insert_Bottom STRING liststr
  1448.       radio ID SQUIT 
  1449.       squitopt=result
  1450.       select
  1451.          when squitopt=_text._squit2 then leave i
  1452.          when squitopt=_text._squit3 then do
  1453.             signal ListMailEnd
  1454.          end
  1455.          otherwise nop
  1456.       end
  1457.    end
  1458.  
  1459.    group ID YTPGS REGISTER LABELS MLpage
  1460.  
  1461. ListMailEnd:
  1462.  
  1463.    window ID YTINF CLOSE   
  1464.  
  1465. Return
  1466. /******************************************************************************/
  1467. /*  Read mail the user selected.                                              */
  1468. /******************************************************************************/
  1469. ReadMail:
  1470.    
  1471.    if debug then say 'Entered ReadMail:'
  1472.    mline=parm||rest
  1473.    if debug then say mline
  1474.    parse var mline arch ',' from ',' subject ',' mfor ','mnum ',' anum ',' file
  1475.    Address YAM "setfolder" anum
  1476.    Address YAM "setmail" mnum
  1477.    Address YAM "getmailinfo file"
  1478.    mpath=result
  1479.    if debug then say 'mpath='mpath
  1480.    if debug then say 'file='file
  1481.    if pos(file,mpath)=0 then do
  1482.       infotext=_text._RMchanged
  1483.       showbusy=TRUE
  1484.       infobuttons=""
  1485.       Call InfoWindow
  1486.       Address YAM "getfolderinfo max"
  1487.       mcnt=result
  1488.       do i=0 to mcnt-1
  1489.          Address YAM "setmail" i
  1490.          Address YAM "getmailinfo file"
  1491.          mpath=result
  1492.          if pos(file,mpath)~=0 then do
  1493.             window ID YTINF CLOSE
  1494.             leave i
  1495.          end
  1496.          else mpath=missing
  1497.       end
  1498.    end
  1499.  
  1500.    popasl ID CFGV
  1501.    viewer=result
  1502.     if words(viewer)>1 then do
  1503.         vieweropts=upper(subword(viewer,2))
  1504.       viewer=upper(word(viewer,1))
  1505.    end
  1506.  
  1507.    if mpath~=missing then do
  1508.         select
  1509.           when viewer='YAM' then do
  1510.       /*   Address YAM "mailreply"     */
  1511.          end
  1512.          when viewer='YAMTOOLS' then do
  1513.              call YTReadMail
  1514.          end
  1515.          otherwise do
  1516.                 fpos=pos('%F',vieweropts)
  1517.             if fpos>0 then do
  1518.                     vieweropts=delstr(vieweropts,fpos,2)
  1519.                vieweropts=insert(mpath,vieweropts,fpos-1)
  1520.             end
  1521.                 spos=pos('%S',vieweropts)
  1522.             if spos>0 then do
  1523.                     vieweropts=delstr(vieweropts,spos,2)
  1524.                vieweropts=insert(screen,vieweropts,spos-1)
  1525.             end
  1526.              Address Command viewer vieweropts
  1527.          end
  1528.       end
  1529.    end
  1530.    else do
  1531.       window ID YTINF CLOSE
  1532.       errmsg=_text._RMdelete2
  1533.       Call ErrorMsg
  1534.    end
  1535.  
  1536. Return
  1537.  
  1538. /**************************************************************************/
  1539. /*                        Read the mail file into array                   */
  1540. /**************************************************************************/
  1541. YTReadMail:     
  1542.  
  1543.     header.=' '
  1544.  
  1545.    i=0
  1546.    header=TRUE
  1547.    if open('IN',mpath,'R') then do
  1548.       Call BuildReadWindow
  1549.       list ID YTRMT ATTRS MUIA_List_Quiet TRUE 
  1550.       list ID YTRMM ATTRS MUIA_List_Quiet TRUE 
  1551.  
  1552.       method ID YTRMH MUIM_List_Clear
  1553.       method ID YTRMT MUIM_List_Clear
  1554.       method ID YTRMM MUIM_List_Clear
  1555.  
  1556.       do until eof('IN')
  1557.          linein=readln('IN')
  1558.          linein=translate(linein,' ',tab)
  1559.          if header then do
  1560.             list ID YTRMH INSERT POS MUIV_List_Insert_Bottom STRING '='linein
  1561.             if linein='' then do 
  1562.                     header=FALSE
  1563.                     do j=1 to 4
  1564.                    list ID YTRMT INSERT POS MUIV_List_Insert_Bottom,
  1565.                               STRING '='header.j
  1566.                     end
  1567.                 end
  1568.                 select
  1569.                 when word(linein,1)='From:' then header.1=linein
  1570.                 when word(linein,1)='To:'   then header.2=linein
  1571.                 when word(linein,1)='Date:' then header.3=linein
  1572.                 when word(linein,1)='Subject:' then header.4=linein
  1573.                     otherwise nop
  1574.                 end
  1575.          end
  1576.          else do
  1577.             if ~eof('IN') then do
  1578.                linein='='||linein
  1579.                list ID YTRMM INSERT POS MUIV_List_Insert_Bottom, 
  1580.                     STRING linein
  1581.                i=i+1
  1582.             end
  1583.          end
  1584.       end
  1585.       foo=close('IN')
  1586.       list ID YTRMT ATTRS MUIA_List_Quiet FALSE
  1587.       list ID YTRMM ATTRS MUIA_List_Quiet FALSE
  1588.    end
  1589.    else do
  1590.       errmsg=_text._nomailfile
  1591.       Call ErrorMsg
  1592.       exit     
  1593.    end
  1594.    
  1595. Return
  1596.  
  1597. /******************************************************************************/
  1598. /*  Display the mail in a list window.                                        */
  1599. /******************************************************************************/
  1600. BuildReadWindow:
  1601.  
  1602.    window ID YTRMW TITLE '"YAM Tools Read Mail"',
  1603.           COMMAND '"window ID YTRMW close"' PORT YAMTOOLS,
  1604.           ATTRS MUIA_Window_PublicScreen screen
  1605.  
  1606.         group
  1607.          group 
  1608.             list ID YTRMH INSERT ATTRS MUIA_ShowMe FALSE
  1609.             list ID YTRMT INSERT ATTRS MUIA_VertWeight 20
  1610.             list ID YTRMM INSERT 
  1611.          endgroup
  1612.          group HORIZ
  1613.             button ID YTRMQ COMMAND '"window ID YTRMW close"' PORT YAMTOOLS,
  1614.                          LABEL _text._quit
  1615.          endgroup
  1616.         endgroup
  1617.  
  1618.    endwindow
  1619.  
  1620. Return
  1621.  
  1622. /******************************************************************************/
  1623. /*                                                                            */
  1624. /* Determine loop control and then invoke the specified command for each of   */
  1625. /* folders, directories, mail, or filenames as appropriate.                   */
  1626. /* 2/26/97 Added execute ONCE option. Passes NO information just Calls.       */
  1627. /*                                                                            */
  1628. /******************************************************************************/
  1629. DoRexxButton:
  1630.  
  1631.    butid='B'||parm 
  1632.    list ID CLST POS parm-1
  1633.    cmdline=result
  1634.    if debug then say 'Entered DoRexxButton'
  1635.    if debug then say 'cmdline='cmdline
  1636.  
  1637.    parse var cmdline blabel ',' btype ',' bcommand
  1638.         
  1639.    group ID YTPGS REGISTER
  1640.    pagename=result
  1641.  
  1642.    select 
  1643.       when pagename=Cpage then do
  1644.          errmsg=_text._wrongpage
  1645.          Call ErrorMsg
  1646.       end
  1647.         when upper(btype)=upper(_text._cfg2O) then do
  1648.          intcommand="Call '"bcommand"'"
  1649.          if debug then say 'intcommand='intcommand
  1650.          interpret intcommand
  1651.       end
  1652.       when pagename=MLpage then do
  1653.          if upper(btype)=upper(_text._cfg2F) then do 
  1654.             errmsg=_text._notfolderpg
  1655.             signal ErrorMsg
  1656.          end                
  1657.          else do
  1658.             list ID MLST ATTRS MUIA_List_Entries
  1659.             mcnt=result
  1660.             if debug then say 'mcnt='mcnt
  1661.             infotext=nl2||nc||_text._processing1||nl2
  1662.             showbusy=TRUE
  1663.             infobuttons=_text._squit1||comma||_text._squit3
  1664.             Call InfoWindow
  1665.             proclist.0=0
  1666.             do msel=0 to mcnt
  1667.                list ID MLST
  1668.                mline=result
  1669.                if debug then say 'mline='mline
  1670.                if mline='' then leave msel
  1671.                proclist.0=1+proclist.0
  1672.                proccnt=proclist.0
  1673.                parse var mline arch ',' from ',' subj ',' mfor ',' mnum ',' anum ',' file
  1674.                proclist.proccnt=anum mnum arch file
  1675.             end
  1676.             if show('L','rexxtricks.library') then do
  1677.                call QSORT(proclist)                
  1678.             end
  1679.             else do                                  
  1680.                call QSORT(1, proclist.0, proclist) 
  1681.             end 
  1682.             do i=proccnt to 1 by -1             /* process backwards */
  1683.                if debug then say proclist.i
  1684.                parse var proclist.i anum mnum arch file
  1685.                file=strip(file)
  1686.                Address YAM "setfolder" anum
  1687.                Address YAM "setmail" mnum
  1688.                Address YAM "getmailinfo file"
  1689.                mpath=result
  1690.                infotext=_text._procfolder||arch||nl||_text._procmail||mnum+1
  1691.                 text ID STEXT LABEL infotext
  1692.                if pos(file,mpath)=0 then do
  1693.                   infotext=_text._RMchanged
  1694.                     text ID STEXT LABEL infotext
  1695.                   Address YAM "getfolderinfo max"
  1696.                   xmcnt=result
  1697.                   do j=0 to xmcnt-1
  1698.                      Address YAM "setmail" j
  1699.                      Address YAM "getmailinfo file"
  1700.                      mpath=result
  1701.                      if pos(file,mpath)~=0 then do
  1702.                         leave j
  1703.                      end
  1704.                      else mpath=missing
  1705.                   end
  1706.                end
  1707.                if mpath~=missing then do
  1708.                   intcommand="Call '"bcommand"' '"mpath"'"
  1709.                   if debug then say 'intcommand='intcommand
  1710.                   interpret intcommand
  1711.                end
  1712.                else do
  1713.                   infotext=_text._RMdeleted
  1714.                     text ID STEXT LABEL infotext
  1715.                end
  1716.                radio ID SQUIT 
  1717.                squitopt=result
  1718.                if squitopt=_text._squit3 then leave msel
  1719.             end
  1720.             window ID YTINF CLOSE
  1721.          end
  1722.       end
  1723.       when pagename=FLpage then do
  1724.          list ID ALST ATTRS MUIA_List_Entries
  1725.          acnt=result
  1726.          infotext=nl2||nc||_text._processing1||nl2
  1727.          showbusy=TRUE
  1728.          infobuttons=_text._squit1||comma||_text._squit3
  1729.          Call InfoWindow
  1730.          do asel=0 to acnt
  1731.             list ID ALST
  1732.             aline=result
  1733.             if aline='' then leave asel
  1734.             parse var aline arch ',' size ',' file ',' anum ',' rest
  1735.             if debug then say 'aline='aline
  1736.                 if size=0 then iterate asel
  1737.             Address YAM "setfolder" anum
  1738.             if upper(btype)=upper(_text._cfg2F) then do 
  1739.                Address YAM "setmail 0"
  1740.                infotext=_text._procfolder||arch
  1741.                 text ID STEXT LABEL infotext
  1742.                intcommand="Call '"bcommand"' '"file"'"
  1743.                if debug then say 'intcommand='intcommand
  1744.                interpret intcommand
  1745.                radio ID SQUIT 
  1746.                squitopt=result
  1747.                if squitopt=_text._squit3 then leave asel
  1748.             end
  1749.             else do
  1750.                Address YAM "getfolderinfo max"
  1751.                mcnt=result
  1752.                do mnum=(mcnt-1) to 0 by -1
  1753.                   Address YAM "setmail" mnum
  1754.                   Address YAM "getmailinfo file"
  1755.                   mpath=result
  1756.                    infotext=_text._procfolder||arch||nl||_text._procmail||mnum+1||"/"||mcnt
  1757.                     text ID STEXT LABEL infotext
  1758.                   intcommand="Call '"bcommand"' '"mpath"'"
  1759.                   if debug then say 'intcommand='intcommand
  1760.                   interpret intcommand
  1761.                   radio ID SQUIT 
  1762.                   squitopt=result
  1763.                   if squitopt=_text._squit3 then leave asel
  1764.                end
  1765.             end
  1766.          end
  1767.          window ID YTINF CLOSE
  1768.       end
  1769.       otherwise do
  1770.          infomsg=_text._otwisebuttons
  1771.          Call InfoMsg
  1772.       end
  1773.    end       
  1774.  
  1775. Return
  1776.  
  1777. /******************************************************************************/
  1778. /*   Get information from main search screen, scan files for search strings   */
  1779. /*   Build screen list of mail that matches criteria                          */
  1780. /******************************************************************************/
  1781. SearchArchs:
  1782.  
  1783.    ADDRESS YAMTOOLS
  1784.  
  1785.    popasl ID CFGM
  1786.    maildir=result
  1787.  
  1788.    popasl ID CFGF 
  1789.    scanprog=result
  1790.  
  1791.    popasl ID CFGQ
  1792.    qsortprog=result
  1793.  
  1794.     tmpfile="T:ytsearch."||timestamp
  1795.    timerfile="T:ytwait."||timestamp
  1796.  
  1797.     sptr=0 
  1798.    srchstr.=missing
  1799.    srchstr.0=0
  1800.  
  1801.    Archlist.=missing
  1802.    Archlist.0=0
  1803.  
  1804.    Matches.=missing
  1805.    Matches.0=0
  1806.  
  1807.    string ID SRC1
  1808.    sval=result
  1809.     if sval~='' & sval~='RESULT' then do
  1810.        srchstr.0=1+srchstr.0
  1811.        sptr=srchstr.0
  1812.       srchstr.sptr=sval
  1813.       srchstr.sptr.1=0
  1814.       if debug then say srchstr.0 'search string:' srchstr.sptr
  1815.    end
  1816.    
  1817.    string ID SRC2
  1818.    sval=result
  1819.    if sval~='' & sval~='RESULT' then do
  1820.       srchstr.0=1+srchstr.0
  1821.       sptr=srchstr.0
  1822.       srchstr.sptr=sval
  1823.       srchstr.sptr.1=0
  1824.       if debug then say srchstr.0 'search string:' srchstr.sptr
  1825.    end
  1826.    
  1827.    string ID SRC3
  1828.    sval=result
  1829.    if sval~='' & sval~='RESULT' then do
  1830.       srchstr.0=1+srchstr.0
  1831.       sptr=srchstr.0
  1832.        srchstr.sptr=sval
  1833.       srchstr.sptr.1=0
  1834.       if debug then say srchstr.0 'search string:' srchstr.sptr
  1835.     end
  1836.  
  1837.    if sptr=0 then do
  1838.       errmsg=_text._nosrchopt
  1839.       Call ErrorMsg
  1840.    end
  1841.  
  1842.    check ID SRCS
  1843.    srchsubj=result
  1844.    check ID SRCF
  1845.    srchfrom=result
  1846.    check ID SRCT
  1847.    srchto=result
  1848.    check ID SRCM
  1849.    srchmsg=result
  1850.    check ID SRCA
  1851.    srchall=result
  1852.    radio ID SLOG
  1853.    matchlogic=result
  1854.    
  1855.     if matchlogic=_text._slog1 then matchreqs=1
  1856.                                else matchreqs=srchstr.0 
  1857.     
  1858.    list ID ALST ATTRS MUIA_List_Entries
  1859.    acnt=result
  1860.    if debug then say 'acnt='acnt
  1861.    
  1862.    list ID MLST ATTRS MUIA_List_Entries
  1863.    mcnt=result
  1864.    if debug then say 'mcnt='mcnt
  1865.  
  1866.    if debug then say 'Clearing Mail List '
  1867.    
  1868.     method ID MLST MUIM_List_Clear
  1869.  
  1870.    button ID SRCX PORT YAMTOOLS ATTRS MUIA_Disabled TRUE
  1871.  
  1872.    _title._info=_title._search
  1873.    infotext=_text._searching
  1874.    infobuttons=_text._squit1||comma||_text._squit2||comma||_text._squit3
  1875.    showbusy=TRUE
  1876.  
  1877.    Call InfoWindow
  1878.  
  1879.    do asel=0 to acnt
  1880.       list ID ALST
  1881.       aline=result
  1882.       if aline='' then break
  1883.       parse var aline arch ',' size ',' file ',' anum ',' rest
  1884.       text ID STEXT LABEL _text._scanning||arch
  1885.       if debug then say 'Call SearchArchive for:' aline
  1886.       if size > 0 then Call SearchArchive
  1887.       archcnt=asel+1 
  1888.       Archlist.0=archcnt
  1889.       Archlist.archcnt=arch
  1890.       Archlist.archcnt.1=anum
  1891.       Archlist.archcnt.1.1=file
  1892.       radio ID SQUIT 
  1893.       squitopt=result
  1894.       select
  1895.          when squitopt=_text._squit2 then leave asel
  1896.          when squitopt=_text._squit3 then do
  1897.             signal SearchArchsEnd
  1898.          end
  1899.          otherwise nop
  1900.       end
  1901.    end
  1902.  
  1903.    if exists(timerfile) then do
  1904.       if ~debug then do
  1905.          Address Command 'Delete ' timerfile 'Quiet'
  1906.       end
  1907.    end   
  1908.  
  1909.    if asel=0 then do
  1910.       errmsg=_text._nosrchfld
  1911.       Call ReEnableSearch
  1912.       Call ErrorMsg
  1913.    end
  1914.  
  1915.    Call DoScanFile
  1916.  
  1917.    radio ID SQUIT 
  1918.    if result~=_text._squit1 then do
  1919.       Call ReEnableSearch
  1920.       errmsg=_text._srchabort
  1921.       Call ErrorMsg
  1922.    end
  1923.  
  1924.    if debug then say 'starting match archlist to matches'
  1925.    if Matches.0=0 then do
  1926.       errmsg=_text._nosrchmat
  1927.       Call ReEnableSearch
  1928.       Call ErrorMsg
  1929.    end
  1930.  
  1931.    list ID MLST INSERT POS MUIV_List_Insert_Bottom ATTRS MUIA_List_Quiet TRUE
  1932.  
  1933.    do i=1 to Archlist.0
  1934.       do j=1 to Matches.0
  1935.          if upper(Matches.j.1)=upper(Archlist.i.1.1) then do
  1936.             Matches.j=Archlist.i
  1937.             Matches.j.1.1.1=Archlist.i.1
  1938.          end
  1939.       end
  1940.    end
  1941.  
  1942. /**************************************************************************/
  1943. /*            Match of scan results to mail within each folder            */
  1944. /*                                                                        */
  1945. /* If only 1 match is found in a given folder then we just loop thru the  */
  1946. /* mail until we find the matching filename. If there is more than 1 in   */
  1947. /* a specific folder then we loop thru the folder, build an array of info */
  1948. /* and then do our matching against the array. This speeds the process up */
  1949. /* for both conditions.  Remove commas from From:,To:, and Subject:       */
  1950. /**************************************************************************/
  1951.  
  1952.    if debug then say "Doing getmailinfo for i=1 to " Matches.0
  1953.    oldfolder=missing
  1954.    do i=1 to Matches.0
  1955.       fptr=i+1
  1956.       if matches.fptr.1.1.1=missing & matches.i.1.1.1=oldfolder then leave i
  1957.       if debug then say 'i='i 'matches.0='matches.0
  1958.       radio ID SQUIT 
  1959.       if result~=_text._squit1 then leave i
  1960.       Address YAM "setfolder" matches.i.1.1.1
  1961.       Address YAM "getfolderinfo max"
  1962.       mailcnt=result
  1963.       if debug then say 'current/next folders' matches.i.1.1.1 matches.fptr.1.1.1
  1964.       if matches.fptr.1.1.1~=matches.i.1.1.1 then do
  1965.          do j=0 to mailcnt-1
  1966.             Address YAM "setmail" j
  1967.             Address YAM "getmailinfo file"
  1968.             mpath=result         
  1969.             if pos(matches.i.1.1,mpath)>0 then do
  1970.                matches.i.1.1.1.1=j                              /* number */
  1971.                Address YAM "getmailinfo from"
  1972.                from=result
  1973.                if pos('<',from)>1 then from=substr(from,1,pos('<',from)-1)
  1974.                matches.i.1.1.1.1.1=translate(from,' ',',')      /*from    */
  1975.                Address YAM "getmailinfo subject"
  1976.                subject=result
  1977.                matches.i.1.1.1.1.1.1=translate(subject,' ',',') /*subject */
  1978.                Address YAM "getmailinfo to"
  1979.                to=result
  1980.                matches.i.1.1.1.1.1.1.1=translate(to,' ',',')    /* To:    */
  1981.                iterate i
  1982.             end
  1983.          end
  1984.       end
  1985.       else do
  1986.          oldptr=i
  1987.          oldfolder=matches.i.1.1.1
  1988.          tempmail.=missing
  1989.          tempmail.0=0
  1990.          if debug then say 'oldptr='oldptr 'oldfolder=oldfolder'
  1991.          do j=0 to mailcnt-1
  1992.             k=j+1
  1993.             tempmail.0=k
  1994.             Address YAM "setmail" j
  1995.             Address YAM "getmailinfo file"
  1996.             tempmail.k=result
  1997.          end 
  1998.          do newptr=oldptr to matches.0
  1999.             i=newptr-1
  2000.             if debug then say 'i='i 'newptr='newptr 'current='matches.newptr.1.1.1 'oldfolder='oldfolder
  2001.             if matches.newptr.1.1.1~=oldfolder then iterate i
  2002.             do j=1 to tempmail.0
  2003.                if pos(matches.newptr.1.1,tempmail.j)>0 then do   
  2004.                   matches.newptr.1.1.1.1=j-1                    /* number */
  2005.                   Address YAM "setmail" j-1
  2006.                   Address YAM "getmailinfo from"
  2007.                   from=result
  2008.                   if pos('<',from)>1 then from=substr(from,1,pos('<',from)-1)
  2009.                   matches.newptr.1.1.1.1.1=translate(from,' ',',')
  2010.                   Address YAM "getmailinfo subject"
  2011.                   subject=result
  2012.                   matches.newptr.1.1.1.1.1.1=translate(subject,' ',',') 
  2013.                   Address YAM "getmailinfo to"
  2014.                   to=result
  2015.                   matches.newptr.1.1.1.1.1.1.1=translate(to,' ',',')
  2016.                   iterate newptr
  2017.                end
  2018.             end
  2019.          end
  2020.       end
  2021.    end
  2022.  
  2023. /**************************************************************************/
  2024. /*   Build the Mail List and switch to the Mail List page.                */
  2025. /**************************************************************************/
  2026.  
  2027.    if debug then say 'Placing info in MLST'
  2028.     do i=1 to Matches.0
  2029.       arch=Matches.i
  2030.       path=Matches.i.1
  2031.       file=Matches.i.1.1
  2032.       anum=Matches.i.1.1.1
  2033.       mnum=Matches.i.1.1.1.1
  2034.       from=Matches.i.1.1.1.1.1
  2035.       subj=Matches.i.1.1.1.1.1.1      
  2036.       mfor=Matches.i.1.1.1.1.1.1.1      
  2037.       liststr=arch||comma||from||comma||subj||comma||mfor||comma||mnum||comma||anum||comma||file
  2038.       list ID MLST INSERT POS MUIV_List_Insert_Bottom STRING liststr
  2039.         if debug then say 'match file='file
  2040.         if debug then say 'match path='path
  2041.    end
  2042.    list ID MLST ATTRS MUIA_List_Quiet FALSE
  2043.  
  2044.    group ID YTPGS REGISTER LABELS MLpage
  2045.  
  2046.    
  2047.  
  2048. SearchArchsEnd:
  2049. ReEnableSearch:
  2050.  
  2051.    window ID YTINF CLOSE   
  2052.  
  2053.    button ID SRCX HELP help.SRCX  NODE node.SRCX COMMAND '"YamTools.rexx SEARCH "', 
  2054.            ATTRS MUIA_CycleChain TRUE MUIA_Disabled FALSE,
  2055.           LABEL _label._srcx
  2056.  
  2057. Return
  2058.  
  2059. /******************************************************************************/
  2060. /*                                                                            */
  2061. /******************************************************************************/
  2062. SearchArchive:
  2063.  
  2064.     sfile=file||'/'
  2065.       
  2066.    do j=1 to srchstr.0
  2067.       if debug then say 'starting 'scanprog sfile srchstr.j
  2068.       Address Command "run >nil: "scanprog sfile '"'srchstr.j'"' " NH NUM >>"tmpfile
  2069.       Call WaitScanDone
  2070.       if debug then say 'finished 'scanprog sfile srchstr.j
  2071.       radio ID SQUIT 
  2072.       if result~=_text._squit1 then leave j     
  2073.    end
  2074.  
  2075. Return
  2076.    
  2077. /**************************************************************************/
  2078. /*                                                                        */
  2079. /* Scan files with output to a temp file. Read lines back into array.     */
  2080. /* Sort the array. Sorted array becomes input for further processing.     */
  2081. /*                                                                        */
  2082. /**************************************************************************/
  2083. DoScanFile:
  2084.  
  2085.    infotext=_text._matching
  2086.    text ID STEXT LABEL infotext
  2087.  
  2088.    ScanArray.=missing          /* stores parsed information from scan prg */
  2089.    ScanArray.0=0                            /* no scan lines yet          */
  2090.    sptr=0                                   /* counter for array          */     
  2091.  
  2092.    Matches.=missing                         /* array for matches          */
  2093.    Matches.0=0                              /* none yet                   */
  2094.    matchcnt=0                               /* used to determine matches  */
  2095.  
  2096.    olddir =missing                          /* level break controls       */
  2097.    oldfile=missing                          /* level break controls       */
  2098.  
  2099.    goodopen=open('IN',tmpfile,'R')
  2100.    if ~goodopen then do
  2101.       /* put user notification code/call here */
  2102.       exit
  2103.    end
  2104.  
  2105.    do until eof('IN')
  2106.       linein=readln('IN')
  2107.       select
  2108.          when words(linein)=2 & word(linein,2)='...' then do
  2109.             fullname=word(linein,1)              /* filename with path    */
  2110.             chop=lastpos('/',fullname)           /* start of filename     */
  2111.             filename=substr(fullname,chop+1)     /* just the filename part*/
  2112.             dirname=substr(fullname,1,chop-1)    /* path info             */
  2113.          end
  2114.          when words(linein) > 0 then do
  2115.             linenum=strip(word(linein,1))        /* line number found     */
  2116.             linenum=right(linenum,6,'0')         /* put in leading zeros  */
  2117.             text=subword(linein,2)               /* remaining string      */
  2118.             sptr=sptr+1                          /* increment cnter       */
  2119.             scanarray.0=sptr                     /* store it              */    
  2120.             scanarray.sptr=dirname filename linenum text /* store it      */
  2121.          end
  2122.          otherwise nop                           /* should be end of file */
  2123.       end
  2124.    end
  2125.  
  2126.    result=close('IN')                            /* close the scan file   */
  2127.  
  2128.    if ~debug then do
  2129.       Address Command 'Delete ' tmpfile 'quiet'  /* delete it             */
  2130.    end
  2131.  
  2132.    if show('L','rexxtricks.library') then do    /* use tricks library     */
  2133.       call QSORT(scanarray)                  /* sort by name, line number */
  2134.    end
  2135.    else do                                   /* use QuickSort format      */
  2136.       call QSORT(1, scanarray.0, scanarray)  /* sort by name, line number */
  2137.    end 
  2138.  
  2139.    do i=1 to scanarray.0
  2140.       dirname=word(scanarray.i,1)                /* directory in array    */
  2141.       filename=word(scanarray.i,2)               /* filename in array     */
  2142.       linenum=word(scanarray.i,3)                /* line number in array  */       
  2143.       text=subword(scanarray.i,4)                /* remainder of line     */
  2144.       if dirname~=olddir | filename~=oldfile then do
  2145.          Call TestMatch                          /* see if we use this one*/
  2146.       end
  2147.       type=word(text,1)                          /* header word ??        */
  2148.       if srchall=FALSE then do 
  2149.          Call FilterLines                        /* accept/reject lines   */      
  2150.          if skipline then iterate i
  2151.       end
  2152.       do j=1 to srchstr.0                        /* loop thru search vals */
  2153.          if pos(upper(srchstr.j),upper(text))>0 then do /* found match    */
  2154.             srchstr.j.1=1                        /* mark as found         */ 
  2155.          end
  2156.       end
  2157.    end                                  /* matches do i=1 to scanarray.0  */
  2158.  
  2159.    Call TestMatch                                /* test LAST file        */
  2160.  
  2161. Return
  2162.  
  2163. /**************************************************************************/
  2164. /*                                                                        */
  2165. /* Need to accept/reject lines based on type.                             */
  2166. /* Easy ones are Subject: From: To: etc.                                  */
  2167. /* Assume that if variable type (word 1 of line) ends in ':' not text line*/
  2168. /*                                                                        */
  2169. /**************************************************************************/
  2170. FilterLines:
  2171.    
  2172.    skipline=FALSE                                /* assume good line      */
  2173.    select
  2174.        when right(type,1)~=':' & srchmsg then nop
  2175.        when right(type,1)~=':' & srchmsg then nop
  2176.       when type='Subject:' & srchsubj then nop 
  2177.       when type='From:' & srchfrom then nop 
  2178.       when type='Reply-To:' & srchfrom then nop 
  2179.       when type='Sender:' & srchfrom then nop 
  2180.       when type='To:' & srchto then nop 
  2181.       when type='CC:' & srchto then nop 
  2182.       otherwise skipline=TRUE                    /* assume we skip it     */
  2183.    end
  2184.  
  2185. Return
  2186.  
  2187. /**************************************************************************/
  2188. /*                                                                        */
  2189. /* Test for match condition and reset the necessary variables.            */
  2190. /* for 'AND' conditions matchcnt should be the sum of how many searches   */
  2191. /* for 'OR'  any search value found counts as a match                     */
  2192. /*                                                                        */
  2193. /**************************************************************************/
  2194. TestMatch:
  2195.  
  2196.    matchcnt=0                                    /* reset for new file    */
  2197.  
  2198.    do j=1 to srchstr.0
  2199.       matchcnt=matchcnt+srchstr.j.1              /* get match counts      */
  2200.    end
  2201.  
  2202.    if matchcnt>=matchreqs & olddir~=missing then do       /* got a match  */
  2203.       Matches.0=1+Matches.0                      /* count it              */
  2204.       mptr=matches.0
  2205.       Matches.mptr.1=olddir                      /* store directory name  */     
  2206.       Matches.mptr.1.1=oldfile                   /* store file name       */     
  2207.    end
  2208.    olddir=dirname                                /* copy for next break   */
  2209.    oldfile=filename                              /* copy for next break   */
  2210.    do j=1 to srchstr.0                           /* loop thru search vals */
  2211.       srchstr.j.1=0                              /* set matches to zero   */ 
  2212.    end
  2213.  
  2214. Return
  2215.  
  2216. /**************************************************************************/
  2217. /*              Wait until scan program not in task list                  */
  2218. /**************************************************************************/
  2219. WaitScanDone:
  2220.  
  2221.    do timer=1                                    /* allows iterate timer  */
  2222.       Address Command "status > "timerfile
  2223.       foo=delay(delaytm)                         /* pause for command     */
  2224.       goodopen=open('IN',timerfile,'R')
  2225.       if goodopen then do 
  2226.          do until eof('IN')
  2227.             linein=readln('IN')
  2228.             if pos(scanprog,linein)>0 then do
  2229.                result=close('IN')
  2230.                iterate timer                     /* keep looping          */
  2231.             end
  2232.          end
  2233.          result=close('IN')
  2234.          leave timer
  2235.       end
  2236.       else do 
  2237.          infomsg=_text._badtimerfile
  2238.          Call InfoMsg
  2239.       end
  2240.    end
  2241.  
  2242. Return
  2243. /******************************************************************************/
  2244. /*                                                                            */
  2245. /* Display informationn about YAMTOOLS, YAM, MUIREXX.                         */
  2246. /*                                                                            */
  2247. /******************************************************************************/
  2248. AboutProgs:
  2249.  
  2250.    Address YAM 'info title'
  2251.    yamtitle=result 
  2252.    Address YAM 'info copyright'
  2253.    yamcopy=result
  2254.    
  2255.    select
  2256.       when parm='YAM' then do
  2257.          abtitle=ababout||yamtitle||" "||yamcopy
  2258.          aboutlist=FALSE
  2259.          fontsize="ATTRS MUIA_FONT MUIV_Font_Big"
  2260.          aboutmsg=bc||abdescYAM
  2261.          Call AboutWin
  2262.       end
  2263.       when parm='MUIREXX' then do
  2264.          info 'copyright'
  2265.          mrxcopy=result
  2266.          abtitle=ababout||parm||" "||mrxcopy
  2267.          aboutlist=FALSE
  2268.          aboutmsg=ct||abdescMRX
  2269.          Call AboutWin
  2270.       end
  2271.       when parm='TRANSLATE' then do
  2272.          abtitle=ababout||" "||transabt
  2273.          aboutlist=TRUE
  2274.          aboutmsg=bo||ct||transtitle
  2275.          Call AboutWin
  2276.          do i=1 to trans.0
  2277.             list ID ABLST INSERT POS MUIV_List_Insert_Bottom STRING trans.i
  2278.          end
  2279.          list ID ABLST POS MUIV_List_Insert_Top
  2280.       end
  2281.       otherwise do
  2282.          abtitle=ababout||parm
  2283.          abcopyYAM =yamtitle||' '||yamcopy
  2284.          aboutmsg=bc||abdescYT||nl||nc||abcopyYT||nl||abtxt.19||nl||abcopyYAM||nl||abcopyMRX||nl||abcopyMUI
  2285.          Call AboutWin
  2286.          do i=1 to abtxt.0
  2287.             list ID ABLST INSERT POS MUIV_List_Insert_Bottom STRING abtxt.i
  2288.          end
  2289.          list ID ABLST POS MUIV_List_Insert_Top
  2290.       end
  2291.    end
  2292.  
  2293. Return
  2294. /******************************************************************************/
  2295. /*  Display window for ABOUT programs.                                        */
  2296. /******************************************************************************/
  2297. AboutWin:
  2298.    window ID YTABT TITLE '"'abtitle'"' MUIA_Window_DepthGadget FALSE,
  2299.           MUIA_Window_PublicScreen screen
  2300.       group
  2301.          text fontsize LABEL aboutmsg
  2302.       endgroup
  2303.       if aboutlist then do
  2304.          group 
  2305.             list ID ABLST
  2306.          endgroup
  2307.       end
  2308.       group HORIZ
  2309.          group
  2310.             space HORIZ
  2311.          endgroup
  2312.          group
  2313.             button  COMMAND '"window ID YTABT CLOSE"' PORT YAMTOOLS,
  2314.                    LABEL _text._ok
  2315.          endgroup
  2316.          group
  2317.             space HORIZ
  2318.          endgroup
  2319.       endgroup
  2320.    endwindow
  2321.  
  2322. Return
  2323.  
  2324. /******************************************************************************/
  2325. /*  Display ERROR message and EXIT.                                           */
  2326. /******************************************************************************/
  2327. ErrorMsg:
  2328.  
  2329.    window ID YTINF CLOSE
  2330.  
  2331.    if ~goodconfig then do
  2332.       method ID YTWIN MUIM_Window_ToFront
  2333.       group ID YTPGS  ATTRS MUIA_ShowMe TRUE
  2334.       group ID YTPGS  REGISTER LABELS Cpage
  2335.       group ID YTCON  REGISTER LABELS badpage
  2336.    end
  2337.  
  2338.    request ID ERRM GADGETS _text._ok errmsg
  2339.    method ID  ERRM MUIM_Window_ToFront   
  2340.  
  2341.    if shutdown then do
  2342.       Address YAMTOOLS "QUIT"
  2343.    end
  2344.  
  2345.    exit
  2346.  
  2347. Return
  2348.  
  2349. /******************************************************************************/
  2350. /*  Display information message and RETURN                                    */
  2351. /******************************************************************************/
  2352. InfoMsg:
  2353.  
  2354.    request ID INFOM GADGETS _text._ok infomsg
  2355.  
  2356. Return
  2357.  
  2358. /******************************************************************************/
  2359. /*  Simple information/error message window.                                  */
  2360. /******************************************************************************/
  2361. InfoWindow:
  2362.  
  2363.    window ID YTINF TITLE _title._info ATTRS MUIA_Window_PublicScreen screen,
  2364.           MUIA_Window_SizeGadget FALSE,
  2365.           MUIA_Window_DepthGadget FALSE
  2366.  
  2367.       group 
  2368.          group 
  2369.             text ID STEXT HELP help.STEXT  NODE node.STEXT LABEL infotext
  2370.          endgroup
  2371.          if showbusy then do
  2372.             group
  2373.                object CLASS '"Busy.mcc"' ATTRS MUIA_VertWeight 25
  2374.             endgroup
  2375.          end
  2376.          if infobuttons ~='' then do
  2377.             group HORIZ
  2378.                group 
  2379.                   space HORIZ 
  2380.                endgroup
  2381.                group 
  2382.                   radio ID SQUIT HELP help.SQUIT  NODE node.SQUIT LABELS infobuttons
  2383.                endgroup
  2384.                group 
  2385.                   space HORIZ 
  2386.                endgroup
  2387.             endgroup
  2388.          end
  2389.          else do
  2390.             group 
  2391.                space HORIZ 100
  2392.             endgroup
  2393.          end
  2394.       endgroup
  2395.    endwindow
  2396.  
  2397. Return
  2398.  
  2399. /******************************************************************************/
  2400. /*                      MUIREXX TAGS & VARIABLES                              */
  2401. /******************************************************************************/
  2402. Muivars:
  2403.  
  2404. Application_AboutMUI =      0x8042d21d
  2405. Application_OpenConfigWindow = 0x804299ba
  2406.  
  2407. MUIA_Application_Author =   0x80424842
  2408. MUIA_Application_Base =     0x8042e07a
  2409. MUIA_Application_Copyright= 0x8042ef4d
  2410. MUIA_Application_Description=0x80421fc6
  2411. MUIA_Application_Title =    0x804281b8
  2412. MUIA_Application_Version =  0x8042b33f
  2413.  
  2414. MUIA_Background  =          0x8042545b
  2415. MUIA_CycleChain =           0x80421ce7
  2416. MUIA_Disabled =             0x80423661
  2417. MUIA_Draggable =            0x80420b6e 
  2418. MUIA_DrawersOnly =          0x8008002F
  2419. MUIA_Dropable =             0x8042fbce 
  2420. MUIA_Font =                 0x8042be50
  2421. MUIA_Frame  =               0x8042ac64
  2422. MUIA_HorizWeight =          0x80426db9
  2423. MUIA_Group_Columns =        0x8042f416
  2424. MUIA_Group_SameSize =       0x80420860
  2425. MUIA_List_Active =          0x8042391c 
  2426. MUIA_List_DragSortable =    0x80426099
  2427. MUIA_List_Entries =         0x80421654 
  2428. MUIA_List_Format =          0x80423c0a 
  2429. MUIA_List_InsertPosition =  0x8042d0cd
  2430. MUIA_List_Quiet =           0x8042d8c7 
  2431. MUIA_List_ShowDropMarks =   0x8042c6f3 
  2432. MUIA_Listview_DoubleClick = 0x80424635
  2433. MUIA_Listview_DragType =    0x80425cd3
  2434. MUIA_Listview_MultiSelect = 0x80427e08
  2435. MUIA_Listview_SelectChange= 0x8042178f 
  2436. MUIA_Menustrip_Enabled =    0x8042815b
  2437. MUIA_Menuitem_Shortcut =    0x80422030 
  2438. MUIA_Menuitem_Title =       0x804218be 
  2439. MUIA_Numeric_Max =          0x8042d78a
  2440. MUIA_Numeric_Min =          0x8042e404
  2441. MUIA_Numeric_Default =      0x804263e8
  2442. MUIA_Scrollgroup_FreeHoriz =0x804292f3
  2443. MUIA_Selected =             0x8042654b
  2444. MUIA_ShortHelp =            0x80428fe3
  2445. MUIA_ShowMe =               0x80429ba8
  2446. MUIA_String_AdvanceOnCR =   0x804226de
  2447. MUIA_VertWeight =           0x804298d0 
  2448. MUIA_Weight =               0x80421d1f 
  2449. MUIA_Window_DepthGadget  =  0x80421923
  2450. MUIA_Window_ActiveObject =  0x80427925
  2451. MUIA_Window_PublicScreen =  0x804278e4
  2452. MUIA_Window_SizeGadget  =   0x8042e33d
  2453.  
  2454. MUIM_List_Clear =           0x8042ad89
  2455. MUIM_Notify_Notify   =      0x8042c9cb
  2456. MUIM_Notify_Set      =      0x8042549a
  2457. MUIM_Window_ToBack =        0x8042152e 
  2458. MUIM_Window_ToFront =       0x8042554f
  2459.  
  2460. ASLFR_InitialFile =         0x80080008
  2461. ASLFR_InitialDrawer =       0x80080009
  2462.  
  2463. TRUE=1
  2464. FALSE=0
  2465.  
  2466. MUIV_Font_Big = -6
  2467. MUIV_Frame_None  = 0
  2468. MUIV_List_GetEntry_Active = -1
  2469. MUIV_List_Insert_Active = -1
  2470. MUIV_List_Insert_Bottom = -3
  2471. MUIV_List_Insert_Top = 0
  2472. MUIV_Listview_DragType_Immediate = 1
  2473. MUIV_Listview_MultiSelect_Shifted = 2
  2474. MUII_WindowBack  = 0
  2475. MUIV_Window_ActiveObject_Next = -1
  2476.  
  2477. Return
  2478.  
  2479. /**************************************************************************/
  2480. /*           Various values used throughout the various routines          */
  2481. /**************************************************************************/
  2482. YTvars:
  2483.  
  2484. aboutlist=TRUE                              /* show list in about window  */
  2485. comma=','                                   /* used in string building    */
  2486. tab='09'x                                   /* tab character              */
  2487. configheader='YamTools Configuration File -- Copyright by Dick Whiting'
  2488. emptyconfig='empty'||comma||'none'||comma||'<----available---->' 
  2489. delaytm=20                                  /* wait time per loop         */
  2490. fontsize=''                                 /* used to change FONT size   */
  2491. infolines=28                                /* number of header lines     */
  2492. maxarchs=50000                              /* very large number for loop */
  2493. missing='.'                                 /* indicate missing value     */
  2494. showbusy=FALSE                              /* don't show busy indicator  */
  2495. shutdown=FALSE                              /* flag for quitting YAMTOOLS */
  2496. timestamp=time('S')                         /* timestamp for temp files   */
  2497. goodconfig=TRUE                             /* assume config good         */
  2498. Bcolmax=20                                  /* max number of columns      */
  2499. Browmax=40                                  /* maximum rows of buttons    */
  2500. emptymax=5            /* allow for 5 delete folders in a row -- arbitrary */
  2501.  
  2502. bo='\033b'                                  /* print control BOLD         */
  2503. bc='\033b\033c'                             /* print control BOLD CENTER  */
  2504. nc='\033n\033c'                             /* print control NORM CENTER  */
  2505. np='\033n'                                  /* print control NORM         */
  2506. nl='\n'                                     /* print control 1 NEW LINE   */
  2507. nl2='\n\n'                                  /* print control 2 NEW LINES  */
  2508. ct='\033c'                                  /* print control CENTER       */
  2509. lf='\033l'                                  /* print control LEFT ALIGN   */
  2510. rt='\033r'                                  /* print control RIGHT ALIGN  */
  2511.  
  2512. Return
  2513.  
  2514. /**************************************************************************/
  2515. /*    Messages, text, etc. constructed using previously defined values    */
  2516. /**************************************************************************/
  2517. Builtvars:
  2518.  
  2519. /*********************************/
  2520. /* Folder page character strings */
  2521. /*********************************/
  2522. _title._alst='"'||bo||_col._alst1||comma||bo||_col._alst2||comma||comma||'"'
  2523. _label._search=bc||_text._search
  2524. _label._srcf=lf||_text._srcf
  2525. _label._srct=lf||_text._srct
  2526. _label._srcs=lf||_text._srcs
  2527. _label._srcm=lf||_text._srcm
  2528. _label._srca=lf||_text._srca
  2529. _label._slog=_text._slog1||comma||_text._slog2
  2530. _label._src1=lf||bo||_text._src1
  2531.  
  2532. /*********************************/
  2533. /* Mail page character strings   */
  2534. /*********************************/
  2535. _title._mlst='"'||bo||_col._mlst1||comma||bo||_col._mlst2||comma||bo||_col._mlst3||comma||bo||_col._mlst4||comma||comma||comma||'"' 
  2536.  
  2537. /*********************************/
  2538. /* System page character strings */
  2539. /*********************************/
  2540. _label._cfgm=lf||bo||_text._cfgm
  2541. _label._cfgf=lf||bo||_text._cfgf
  2542. _label._cfgq=lf||bo||_text._cfgq
  2543. _label._cfgv=lf||bo||_text._cfgv
  2544. _label._cfge=lf||bo||_text._cfge
  2545. _label._cfgd=lf||bo||_text._cfgd
  2546. _label._cfgb=lf||bo||_text._cfgb
  2547. _label._cfgs=lf||bo||_text._cfgs
  2548. _label._cfgx=lf||bo||_text._cfgx
  2549. _label._cfgy=lf||bo||_text._cfgy
  2550.  
  2551. /*********************************/
  2552. /* ARexx  page character strings */
  2553. /*********************************/
  2554. _title._clst='"'||bo||_col._clst1||comma||bo||_col._clst2||comma||bo||_col._clst3||'"' 
  2555. _label._cfg1=lf||bo||_text._cfg1
  2556. _label._cfg2=bo||_text._cfg2
  2557. _label._cfg2cycle=_text._cfg2M||comma||_text._cfg2F||comma||_text._cfg2O
  2558. _label._cfg3=lf||bo||_text._cfg3
  2559. _label._cfgc=bo||_text._cfgc
  2560. _label._cfgr=bo||_text._cfgr
  2561.  
  2562. /*********************************/
  2563. /* Miscellaneous messages, etc.  */
  2564. /*********************************/
  2565. badpage=Spage                               /* first CONFIG page          */
  2566.  
  2567. Return
  2568.  
  2569. /**************************************************************************/
  2570. /*               Pointers into the YamTools.guide documentation           */
  2571. /**************************************************************************/
  2572. Helpvars:
  2573.  
  2574. node.ALST='4.1.'
  2575. node.ARLD='4.1.'
  2576. node.B00='6.2.'
  2577. node.CFG1='6.2.'
  2578. node.CFG2='6.2.'
  2579. node.CFG3='6.2.'
  2580. node.CFG4='6.2.'
  2581. node.CFG5='6.2.'
  2582. node.CFG6='6.2.'
  2583. node.CFG7='6.2.'
  2584. node.CFG9='6.2.'
  2585. node.CFGA='6.2.'
  2586. node.CFGB='6.1.'
  2587. node.CFGC='6.2.'
  2588. node.CFGD='6.1.'
  2589. node.CFGE='6.1.'
  2590. node.CFGF='6.1.'
  2591. node.CFGM='6.1.'
  2592. node.CFGQ='6.1.'
  2593. node.CFGR='6.2.'
  2594. node.CFGS='6.1.'
  2595. node.CFGV='6.1.'
  2596. node.CFGX='6.1.'
  2597. node.CFGY='6.1.'
  2598. node.CLST='6.2.'
  2599. node.MDIR='6.1.'
  2600. node.MLST='5.1.'
  2601. node.SLOG='4.3.'
  2602. node.SQUIT='7.2.'
  2603. node.SRC1='4.3.'
  2604. node.SRC2='4.3.'
  2605. node.SRC3='4.3.'
  2606. node.SRCA='4.3.'
  2607. node.SRCF='4.3.'
  2608. node.SRCM='4.3.'
  2609. node.SRCS='4.3.'
  2610. node.SRCT='4.3.'
  2611. node.SRCX='4.3.'
  2612. node.STEXT='7.2.'
  2613.  
  2614. Return
  2615.  
  2616. /**************************************************************************/
  2617. /*       Mui Gadgets, text, msgs, etc. used in YamTools                   */
  2618. /**************************************************************************/
  2619. Localize:
  2620.  
  2621. /*********************************/
  2622. /* Page Name character strings   */
  2623. /*********************************/
  2624. FLpage="FolderList"     /* title for Folder List Page - NO SPACES ALLOWED */
  2625. MLpage="MailList"       /* title for Mail   List Page - NO SPACES ALLOWED */
  2626. Cpage="Config"          /* title for Config Page - NO SPACES ALLOWED      */
  2627. Spage="System"          /* title for System Page - NO SPACES ALLOWED      */
  2628. Apage="ARexx"           /* title for ARexx  Page - NO SPACES ALLOWED      */
  2629.  
  2630. /*********************************/
  2631. /* Menu character strings        */
  2632. /*********************************/
  2633. _label._project="Project"                   /* menu label Project         */
  2634. _label._about="About..."                    /* menu item About            */
  2635. _label._translate="Translators"             /* menu item about tranlators */
  2636. _label._save="Save"                         /* menu item Save             */
  2637. _label._saveas="Save As..."                 /* menu item Save As          */
  2638. _label._open="Open..."                      /* menu item Open             */
  2639. _label._quit="Quit"                         /* menu item Quit             */
  2640. _label._settings="Settings"                 /* menu label Settings        */
  2641. _label._showpage="Show Pages"               /* menu item Show Pages       */
  2642. _label._hidepage="Hide Pages"               /* menu item Hide Pages       */
  2643.  
  2644. /*********************************/
  2645. /* Folder page character strings */
  2646. /*********************************/
  2647. _label._mdir="Mail Directory:"              /* label for Mail Directory   */
  2648. _col._alst1="Yam Folder"                    /* heading for ALST column 1  */
  2649. _col._alst2="Count"                         /* heading for ALST column 2  */
  2650.  
  2651. _label._arld="Load Folder List"             /* label for Reload button    */
  2652. _text._search="Search Types of Lines"       /* text for SEACH options     */
  2653. _text._srcf="FROM:"                         /* search FROM: lines label   */
  2654. _text._srct="TO:"                           /* search TO:   lines label   */
  2655. _text._srcs="SUBJECT:"                      /* search SUBJECT: lines label*/
  2656. _text._srcm="TEXT:"                         /* search TEXT: lines label   */
  2657. _text._srca="ALL:"                          /* search ALL:  lines label   */
  2658. _text._slog1="Match Any"                    /* text for option MATCH ANY  */
  2659. _text._slog2="Match All"                    /* text for option MATCH ALL  */
  2660. _text._src1="Enter Search Strings:"         /* text for enter search strgs*/
  2661. _label._srcx="Search"                       /* label for SEARCH button    */
  2662.  
  2663. /*********************************/
  2664. /* Mail page character strings   */
  2665. /*********************************/
  2666. _col._mlst1="Yam Folder"                    /* heading for MLST column 1  */
  2667. _col._mlst2="From"                          /* heading for MLST column 2  */
  2668. _col._mlst3="Subject"                       /* heading for MLST column 3  */
  2669. _col._mlst4="To"                            /* heading for MLST column 4  */
  2670.  
  2671. /*********************************/
  2672. /* System page character strings */
  2673. /*********************************/
  2674. _text._cfgm="Mail Directory:"               /* text for Mail Dir location */
  2675. _text._cfgf="FlashFind:"                    /* text for FlashFind loc     */
  2676. _text._cfgq="QuickSort:"                    /* text for QuickSort loc     */
  2677. _text._cfgv="Viewer:"                       /* text for Viewer: loc/opts  */
  2678. _text._cfge="Editor:"                       /* text for Editor: loc/opts  */
  2679. _text._cfgd="Delay Archive Load:"           /* text for Delay Load button */
  2680. _text._cfgx="YAM configuration:"            /* text for YAM config file   */
  2681. _text._cfgy="YAM for load list:"            /* text for YAM for load list */
  2682. _text._cfgb="Show YamTools Pages:"          /* text for Show YT pgs button*/
  2683. _text._cfgs="Show Two Windows:"             /* text for Splitscreen button*/
  2684.  
  2685. /*********************************/
  2686. /* ARexx  page character strings */
  2687. /*********************************/
  2688. _col._clst1="Label"                         /* heading for CLST column 1  */
  2689. _col._clst2="Type"                          /* heading for CLST column 2  */
  2690. _col._clst3="Command"                       /* heading for CLST column 3  */
  2691. _label._cfg7="CLEAR"                        /* label for CLEAR  button    */
  2692. _label._cfg9="UNDO"                         /* label for UNDO   button    */
  2693. _label._cfgA="EDIT"                         /* label for EDIT   button    */
  2694. _text._cfg2F="Folder"                       /* cycle TYPE=FOLDER          */
  2695. _text._cfg2M="Mail"                         /* cycle TYPE=MAIL            */
  2696. _text._cfg2O="Once"                         /* cycle TYPE=ONCE            */
  2697. _text._cfg1="Label:"                        /* text LABEL string gadget   */
  2698. _text._cfg2="Type:"                         /* text TYPE  cycle  gadget   */
  2699. _text._cfg3="ARexx:"                        /* text AREXX string gadget   */
  2700. _text._cfgc="Cols:"                         /* text COLS  slider gadget   */
  2701. _text._cfgr="Rows:"                         /* text ROWS  slider gadget   */
  2702.  
  2703. /*********************************/
  2704. /* Common Config string values   */
  2705. /*********************************/
  2706. _label._cfg4="SAVE"                         /* label for SAVE   button    */
  2707. _label._cfg5="USE"                          /* label for USE    button    */
  2708. _label._cfg6="RELOAD"                       /* label for RELOAD button    */
  2709.  
  2710. /*********************************/
  2711. /* Miscellaneous info strings    */
  2712. /*********************************/
  2713. _title._main="""YamTools v2.0"""            /* main screen title          */
  2714. _title._info="""YamTools Info"""            /* default title on infomsg   */
  2715. _title._search="""YamTools Search"""        /* search title on infomsg    */
  2716. _text._squit1="Continue"                    /* CONTINUE option on infowin */
  2717. _text._squit2="Interrupt"                   /* INTERRUPT option on infowin*/
  2718. _text._squit3="Abort"                       /* ABORT    option on infowin */
  2719. _text._ok="Ok"                              /* various OK buttons         */
  2720. _text._quit="Quit"                          /* various QUIT buttons       */
  2721. _text._getfolders="Getting Folder List..."  /* Getting Folder List msg    */ 
  2722. _text._loadmail="Loading Mail list..."      /* Loading Mail List message  */
  2723. _text._processing1="Starting to process entries..."                  
  2724. _text._procfolder="Processing Folder "      /* portion of message         */ 
  2725. _text._procmail="Mail entry "               /* portion of message         */ 
  2726. _text._searching="Starting to Search Folders" /* searching folders msg    */
  2727. _text._matching="Building Match List..."    /* building match list msg    */ 
  2728. _text._scanning="Scanning: "                /* scanning archive message   */ 
  2729. _text._execute="Execute: "                  /* execute arexx button msg   */
  2730. _text._astype="As Type: "                   /* execute arexx button msg   */
  2731.  
  2732. /*********************************/
  2733. /* Various error conditions      */
  2734. /*********************************/
  2735.                      /* Mail order changed..searching msg  '\n'=newline   */
  2736. _text._RMchanged="Order of mail in folder has changed\nSearching for mail..."
  2737.  
  2738.                      /* Mail deleted/moved..continuing msg '\n'=newline   */
  2739. _text._RMdeleted="Mail has been deleted or moved\nContinuing with others"
  2740. _text._RMdelete2="Mail has been deleted or moved"
  2741.  
  2742.                     /* user tried to load a non-config file as a config   */
  2743. _text._notconfig="This is NOT a YamTools Configuration File\nSelect one that is:)"
  2744.  
  2745.                     /* configuration file has errors or can't be found    */
  2746. _text._badconfig="Configuration File not Found or has errors\nPlease enter information\nand SAVE"
  2747.                     /* user has more buttons in config than rows*cols     */
  2748. _text._extrabuttons="Too Many Button Entries in "CONFIGFILE "\nSome buttons may be lost"
  2749.  
  2750. _text._otwisebuttons="Found otherwise in DoRexxButton" /* unlikely error  */
  2751. _text._badtimerfile="Couldnt open timerfile"           /* unlikely error  */                   
  2752. _text._noyam="You need YAM running to use YAMTOOLS"    /* yam not running */
  2753. _text._noqsort="Unable to find QuickSort -- check installation instructions"
  2754. _text._nomdir="You MUST set Mail Directory in Configuration"
  2755. _text._badassign="Couldnt open assignfile: "           /* unlikely error  */
  2756. _text._badvolfile="Couldnt open volumefile: "          /* unlikely error  */
  2757. _text._badfolder="One of more folders do not exist as directory names.\nCheck that MailDir is specified correctly and reload Folder list"
  2758. _text._noeditor="No Editor has been configured"        
  2759. _text._badarexx=" (ARexx file) does not exist"
  2760. _text._opencfgerr="Unable to open Config file for output"
  2761. _text._badmdir=" (Mail directory) does not exist"
  2762. _text._badscan=" (Scan program) does not exist"
  2763. _text._badqsort=" (QuickSort program) does not exist"
  2764. _text._badviewer=" (Viewer program) does not exist"
  2765. _text._badeditor=" (Editor program) does not exist"
  2766. _text._badyamconfig=" (Yam Config) does not exist"
  2767. _text._noyamconfig="YAM configuration file is required to uncheck the YAM FOR LOAD LIST option"
  2768. _text._nolabel="Label is required for: "
  2769. _text._nomailfile="Cannot locate mail file"
  2770. _text._wrongpage="Cannot Execute Buttons from Config Window"
  2771. _text._notfolderpg="This command needs to be run from the folder list"
  2772.  
  2773. _text._nosrchopt="Specify SEARCH strings"
  2774. _text._nosrchfld="Select Folders to Search"
  2775. _text._srchabort="Search Interrupted/Aborted"
  2776. _text._nosrchmat="No Matches Found" 
  2777.  
  2778. /**************************************************************************/
  2779. /*           Help Messages to display with MUI bubble facility.           */
  2780. /*                                                                        */
  2781. /* Format is simple: help.ID where ID is the id specified on the MUI      */
  2782. /* object statement.                                                      */
  2783. /* Similar approach for accessing the .guide information using the NODE   */
  2784. /* option on the object statement.                                        */
  2785. /*                                                                        */
  2786. /**************************************************************************/
  2787.  
  2788. help.ALST="""Select Folders to search\nor run ARexx Program against"""
  2789. help.ARLD="""Use to load/reload folder list\nRequired if you add\nor delete folders"""
  2790. help.B00= """Executes ARexx Program: Define in Configuration"""
  2791. help.CFG1="""Label to appear on button"""
  2792. help.CFG2="""Type of processing to do\n- See Documentation or press HELP"""
  2793. help.CFG3="""ARexx program to execute when button is pressed"""
  2794. help.CFG4="""Save & Use currently defined configuration to file"""
  2795. help.CFG5="""Use currently defined configuration"""
  2796. help.CFG6="""Reload & Use last SAVED/LOADED configuration file"""
  2797. help.CFG7="""Clear Selected Entry\n(Remove Script)"""
  2798. help.CFG9="""Undo LAST edited entry in list"""
  2799. help.CFGA="""Edit Selected ARexx program"""
  2800. help.CFGB="""Uncheck to show only the ARexx Buttons on startup"""
  2801. help.CFGC="""Number of columns of buttons for ARexx programs\nChange takes effect after SAVE and RESTART"""
  2802. help.CFGD="""Check to NOT load archive list on startup"""
  2803. help.CFGE="""Editor for use with YamTools\n%F replaced with filename\n%S replaced with YAM screen name"""
  2804. help.CFGF="""Location of FlashFind program - required"""
  2805. help.CFGM="""Current Mail Directory YAM is using - required"""
  2806. help.CFGQ="""Location of QuickSort program - required"""
  2807. help.CFGR="""Number of rows of buttons for ARexx programs\nChange takes effect after SAVE and RESTART"""
  2808. help.CFGS="""Check to show as two separate windows on startup"""
  2809. help.CFGV="""Viewer and options to use for reading mail\n%F replaced with filename\n%S replaced with YAM screen name\nenter YAMTOOLS to use a MUI window"""
  2810. help.CFGX="""Yam configuration file to obtain information from"""
  2811. help.CFGY="""Check this to use YAM to locate folders (slower)\nUncheck to use the Yam.config file which is faster\nbut does not show number of mail in folder"""
  2812. help.CLST="""Double click to edit entry\nDrag&Drop to Sort"""
  2813. help.MDIR="""Currently defined Mail Directory - change on Config page"""
  2814. help.MLST="""Double click to READ\nSelect for ARexx Execution target"""
  2815. help.SLOG="""Match Any (OR logic)\nMatch All (AND logic)\nfor mail searching"""
  2816. help.SQUIT="""INTERRUPT will show results upto this point\nABORT stops ALL processing"""
  2817. help.SRC1="""Enter strings to Search for"""
  2818. help.SRC2="""Enter strings to Search for"""
  2819. help.SRC3="""Enter strings to Search for"""
  2820. help.SRCA="""Searches in ALL lines of mail for search strings"""
  2821. help.SRCF="""Searches From: Reply-To: Sender:\nlines in mail for search strings"""
  2822. help.SRCM="""Searches NON-header\nlines in mail for search strings"""
  2823. help.SRCS="""Searches Subject:\nlines in mail for search strings"""
  2824. help.SRCT="""Searches To: CC:\nlines in mail for search strings"""
  2825. help.SRCX="""Start the Search"""
  2826. help.STEXT="""Information Message\nRead it;)"""
  2827.  
  2828. /**************************************************************************/
  2829. /*           These messages are used in the About facility.               */
  2830. /**************************************************************************/
  2831. ababout="About "
  2832.  
  2833. abdescYAM ="!! T H A N K   Y O U   M A R C E L !!"
  2834. abdescMRX ="!! Great Product - Register It !!" 
  2835. abdescYT  ="YamTools -- Add-on Tools For YAM"
  2836. abcopyYT  ="Version 2.0 Copyright ©1997 by Dick Whiting"
  2837. abcopyMRX ="MuiRexx © Russell Leighton"
  2838. abcopyMUI ="MUI © Stefan Stuntz"
  2839.  
  2840. abtxt.0=23                                                                 
  2841. abtxt.1="\033cYAMTOOLS"                               
  2842. abtxt.2="\033cCopyright ©1997 by Dick Whiting"
  2843. abtxt.3="\033n"                                                        
  2844. abtxt.4="--------------------------------------------------------------------"
  2845. abtxt.5="\033n"                                                        
  2846. abtxt.6="=Standard Disclaimer: I wrote it, it works for me, I don't guarantee"
  2847. abtxt.7="=that it will do anything productive for anyone else, etc. etc. ;-)"
  2848. abtxt.8="\033n"                                                                    
  2849. abtxt.9="=HOWEVER, if you DO find a use for it: I homeschool my kids and they"
  2850. abtxt.10="=would love a postcard from where EVER you live."
  2851. abtxt.11="\033n"
  2852. abtxt.12="=Instant GEOGRAPHY lesson;)"
  2853. abtxt.13="\033n"                                                                    
  2854. abtxt.14="=POSTCARDS:   Dick Whiting"
  2855. abtxt.15="=             28590 S. Beavercreek Rd."
  2856. abtxt.16="=             Mulino, Oregon 97042"
  2857. abtxt.17="=             USA"
  2858. abtxt.18="\033n"                                                                    
  2859. abtxt.19="--------------------------------------------------------------------"
  2860. abtxt.20="\033n"                                                                    
  2861. abtxt.21="\033cAddress Bug Reports or Comments to:"                  
  2862. abtxt.22="\033cDick Whiting <dwhiting@europa.com>"
  2863. abtxt.23="\033c15 June 1997"
  2864.  
  2865. transabt="YamTool Translators"
  2866. transtitle="***               YamTool Translators              ***"
  2867.  
  2868. trans.0=4
  2869. trans.1   ="Danish         Henrik Andreasen    larsa@post7.tele.dk"
  2870. trans.2   ="English;-)     Dick Whiting        dwhiting@europa.com"
  2871. trans.3   ="German         Michael Lünse       m.luense@t-online.de"
  2872. trans.4   ="Italian        Francesco Mancuso   mcfrank@mediatel.it"
  2873. trans.5   ="language       name-of-tranlator   email-of-translator"
  2874. trans.6   ="language       name-of-tranlator   email-of-translator"
  2875. trans.7   ="language       name-of-tranlator   email-of-translator"
  2876. trans.8   ="language       name-of-tranlator   email-of-translator"
  2877. trans.9   ="language       name-of-tranlator   email-of-translator"
  2878.  
  2879. Return
  2880.  
  2881.  
  2882.