home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / programme / GoldED / arexx / fold.ged < prev    next >
Encoding:
Text File  |  1998-10-06  |  1.3 KB  |  61 lines

  1. /* $VER: 1.0, ©1996 Dietmar Eilert. Fold marked lines */
  2.  
  3. OPTIONS RESULTS                             /* enable return codes     */
  4.  
  5. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  6.     address 'GOLDED.1'
  7.  
  8. 'LOCK CURRENT RELEASE=4'                    /* lock GUI, gain access   */
  9.  
  10. if (RC ~= 0) then
  11.     exit
  12.  
  13. OPTIONS FAILAT 6                            /* ignore warnings         */
  14.  
  15. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  16.  
  17. /* ------------------------ INSERT YOUR CODE HERE: ------------------- */
  18.  
  19. 'GOTO BFIRST'
  20.  
  21. if (RC = 0) then do
  22.  
  23.     'QUERY CAT'
  24.  
  25.     if (RESULT = "deutsch") then
  26.         'REQUEST STRING TITLE "Kommentar für Faltung ?" VAR NAME'
  27.     else
  28.         'REQUEST STRING TITLE "Comment for this fold ?" VAR NAME'
  29.  
  30.     if (RC = 0) then do
  31.  
  32.         'FIX VAR=NAME'
  33.         'INSERT LINE'
  34.         'FIRST'
  35.         'QUERY FOLDA'
  36.         'TEXT T="' || RESULT || ' *"' || NAME || '*""'
  37.         'GOTO BLAST'
  38.         'SMARTCR'
  39.         'INSERT LINE'
  40.         'FIRST'
  41.         'QUERY FOLDB'
  42.         'TEXT T="' || RESULT || '"'
  43.         'UP'
  44.         'FOLD'
  45.     end
  46. end
  47.  
  48. /* ---------------------------- END OF YOUR CODE --------------------- */
  49.  
  50. 'UNLOCK' /* VERY important: unlock GUI */
  51.  
  52. exit
  53.  
  54. SYNTAX:
  55.  
  56. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  57.  
  58. 'UNLOCK'
  59.  
  60. exit
  61.