home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / wtff104g.zip / filefind.frx next >
Text File  |  1995-05-22  |  4KB  |  110 lines

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /*                           FleetStreet script                              */
  4. /*                                                                           */
  5. /*                              FileFind.Frx                                 */
  6. /*                      starten von WTPMFF im Edit-Modus                     */
  7. /*****************************************************************************/
  8.  
  9. /*****************************************************************************/
  10. /* look for INI-Files                                                        */
  11. /*****************************************************************************/
  12.  
  13. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  14. call SysLoadFuncs
  15.  
  16. INIFILE    = 'USER'
  17. CCHMAXPATH = 260
  18.  
  19. FFPATH = SysIni( INIFILE, 'WagoTEC PM BBS FileFinder', 'Path' )
  20. if FFPATH \= 'ERROR:' then do
  21.    FFPATH = strip( FFPATH,, '00'x )
  22. /*
  23.    FFINI  = FFPATH || 'FileFind.INI'
  24.    SetupData = SysIni( FFINI, 'WagoTEC PM BBS FileFinder', 'Setup' )
  25. */
  26.    FFOUT = SysIni( INIFILE, 'WagoTEC PM BBS FileFinder', 'OutputName' )
  27.    FFOUT = strip( FFOUT,, '00'x )
  28.    FFCMD = FFPATH || 'WTPMFF.exe'
  29.  
  30.    /**************************************************************************/
  31.    /* start FileFind                                                         */
  32.    /**************************************************************************/
  33.  
  34.    address cmd FFCMD
  35.  
  36.    errtxt.0 = 4
  37.    errtxt.1 = "FileFind: Ausführung fehlerhaft"
  38.    errtxt.2 = "FileFind: Ausgabe wurde in Clipboard aufgenommen"
  39.    errtxt.3 = "FileFind: Ausgabe wurde gesichert"
  40.    errtxt.4 = "FileFind: Es wurde keine Ausgabe vorgenommen"
  41.  
  42.    if rc <> 3 then do
  43.       if rc > 0 & rc <= errtxt.0 then do
  44.          say errtxt.rc
  45.       end
  46.       else do
  47.          say "Unerwarteter Fehler" rc "!"
  48.       end
  49.  
  50.       say "Weiter --> <Return> Taste drücken . . ."
  51.       parse pull dummy
  52.  
  53.       exit rc
  54.    end
  55.  
  56.  
  57.    /**************************************************************************/
  58.    /* read results only when editing a message                               */
  59.    /**************************************************************************/
  60.    if word(FleetStatus.Mode, 1) = "Edit" then do
  61.       FFOUT = stream( FFOUT, 'C', 'QUERY EXISTS' )
  62.       if FFOUT <> '' then do
  63.          i=0
  64.          do while lines( FFOUT )
  65.             i=i+1
  66.             foundline.i = linein( FFOUT )
  67.          end
  68.          foundline.0 = i
  69.  
  70.          /***********************************************************************/
  71.          /* insert results at cursor position                                   */
  72.          /***********************************************************************/
  73.          do i = FleetMsg.Text.0 to word( FleetStatus.Cursor, 1 ) +1 by -1
  74.             j = i+foundline.0
  75.             FleetMsg.Text.j = FleetMsg.Text.i
  76.          end
  77.  
  78.          j = word( FleetStatus.Cursor, 1 )
  79.          do i = 1 to foundline.0
  80.             z = j + i
  81.             FleetMsg.Text.z = foundline.i
  82.          end
  83.  
  84.          FleetMsg.Text.0 = FleetMsg.Text.0 + foundline.0
  85.  
  86.          /***********************************************************************/
  87.          /* Display new text                                                    */
  88.          /***********************************************************************/
  89.          call FSSetText 'FleetMsg.Text'
  90.  
  91.       end
  92.    end
  93. end
  94.  
  95. exit 0
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.