home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games 1995 January / amigagames-1995-01.iso / archive / userbox / publicdomain / ged313.lha / Install / data / main / GoldED / arexx / number.ged < prev    next >
Text File  |  1993-06-23  |  2KB  |  75 lines

  1. /* $VER: 0.9, ©1993 Dietmar Eilert. Number 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'                              /* lock GUI, gain access   */
  9. OPTIONS FAILAT 6                            /* ignore warnings         */
  10. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  11.  
  12. /* ------------------------- INSERT YOUR CODE HERE: -------------------- */
  13.  
  14. 'QUERY CAT'
  15. isGerman = (result = "deutsch")
  16.  
  17. 'QUERY ANYTEXT'
  18.  
  19. if (result = TRUE) then 
  20.  
  21.     do
  22.         if (isGerman) then
  23.             'REQUEST LONG TITLE="Erste Zeilennummer:" MIN=0 MAX=10000 VAR=FIRST'
  24.         else
  25.             'REQUEST LONG TITLE="Enter 1st number:"   MIN=0 MAX=10000 VAR=FIRST'
  26.  
  27.         if (RC = 0) then do
  28.  
  29.             if (isGerman) then
  30.                 'REQUEST LONG TITLE "Schrittweite:" MIN=1 OLD=10 VAR=STEP'
  31.             else
  32.                 'REQUEST LONG TITLE "Enter step:"   MIN=1 OLD=10 VAR=STEP'
  33.  
  34.             if (RC = 0) then do
  35.  
  36.                 'FOLD ALL OPEN=TRUE'
  37.                 'QUERY LINES VAR=LINES'
  38.                 'MODE INSERT TRUE'
  39.                 'GOTO LINE=1 COLUMN=1'
  40.  
  41.                 size   = LENGTH(first + lines * step)
  42.                 number = first
  43.  
  44.                 do line = 1 to lines
  45.  
  46.                     'TEXT STAY T="' || right('0000000' || number, size) || ' "'
  47.                     'DOWN'
  48.  
  49.                     number = number + step
  50.                 end
  51.             end
  52.         end
  53.     end
  54.  
  55. else do
  56.  
  57.    if (isGerman) then
  58.        'REQUEST BODY="Kein Text vorhanden ?!"'
  59.     else
  60.        'REQUEST BODY="Text buffer is empty ?!"'
  61. end
  62.  
  63.  
  64.  
  65. /* ---------------------------- END OF YOUR CODE ----------------------- */
  66.  
  67. 'UNLOCK' /* VERY important: unlock GUI */
  68. EXIT
  69.  
  70. SYNTAX:
  71.  
  72. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  73. 'UNLOCK'
  74. EXIT
  75.