home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / tags.zip / tagput.frx < prev   
Text File  |  1995-01-29  |  2KB  |  66 lines

  1. /***************************************************************************/
  2. /* TagLine Set                                                             */
  3. /*  Pastes a tag into the current message from the tags.tag file           */
  4. /*                                                                         */
  5. /*  version 1.00 of FleetStreet and higher                                 */
  6. /*                                                                         */
  7. /*  from Simon Ewins (1:250/664)   -   Version 1.0  -   01-27-95           */
  8. /***************************************************************************/
  9.  
  10. tagfile  = 'TAGS.TAG'
  11.  
  12. Call RxFuncAdd 'SysFileTree', 'RexxUtil', 'SysFileTree'
  13. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  14. Call SysLoadFuncs
  15.  
  16. r=FSCls()
  17. count = FleetMsg.Text.0
  18. tagtext = ''
  19. l.      = ''
  20. do i = 1 to count
  21.    if left(FleetMsg.Text.i,3) = '---' then
  22.       do
  23.          say 'Unable to add a tag to a message with a tearline'
  24.          say ' '
  25.          say 'TagPut can only be used while editing a message. Tag lines'
  26.          say 'cannot be added to an existing message.'
  27.          exit
  28.       end
  29. end
  30.  
  31. if stream(tagfile, 'c', 'open read') = 'READY:' then
  32.    do
  33.       i = 1
  34.       linecount = 1
  35.       do while lines(tagfile) = 1 & tagtext = ''
  36.          l.linecount = linein(tagfile)
  37.          say ' ' || right(linecount,2,'0') || ' : ' || l.linecount
  38.          linecount = linecount + 1
  39.          if linecount = 15 then
  40.             do
  41.                linecount = 1
  42.                say ''
  43.                say 'TagGet v1.0 by Simon Ewins :: Enter=Next Page, Q=Quit, ##=Select Tag'
  44.                parse upper pull action .
  45.                if left(action,1) = 'Q' then exit
  46.                if datatype(action) = 'NUM' then
  47.                   do
  48.                      if action > 0 & action < 15 then tagtext = l.action
  49.                   end
  50.                r=FSCls()
  51.                i = i + 1
  52.             end
  53.       end
  54.    end
  55.    stream(tagfile, 'c', 'close')
  56. count = count + 1
  57. FleetMsg.Text.0=count
  58. FleetMsg.Text.count=tagtext
  59. say ' '
  60. say FSSetText('FleetMsg.Text')
  61. say tagtext
  62. say ' '
  63. say 'Tag set successfully'
  64. exit
  65.  
  66.