home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / ADPro251-3.DMS / ADPro251-3.adf / ADProScripts.lha / GETFILES_Examples.adpro < prev    next >
Encoding:
Text File  |  1994-01-31  |  918 b   |  48 lines

  1. /*
  2. ** GETFILES_Examples.adpro
  3. **
  4. ** $VER: GETFILES_Examples.adpro 1.1.0 (26.10.93)
  5. **
  6. ** This ARexx program is an example of how to use the GETFILES command.
  7. **
  8. ** This script requires ADPro v2.5.0 (or higher).
  9. **
  10. ** Copyright © 1991-1993 ASDG, Incorporated
  11. ** All Rights Reserved
  12. */
  13.  
  14.  
  15. ADDRESS "ADPro"
  16. OPTIONS RESULTS
  17.  
  18. NL = '0A'X
  19. SQ = '27'X
  20. DQ = '22'X
  21. TRUE  = 1
  22. FALSE = 0
  23.  
  24. OrdinalWords = "first second third fourth fifth sixth"
  25. OrdinalMax   = 6
  26.  
  27. ADPRO_TO_FRONT
  28.  
  29. GETFILES '"Select A Few Files"'
  30. IF (RC ~= 0) THEN
  31.     EXIT 0
  32.  
  33. TheFiles      = ADPRO_RESULT
  34. NumberOfFiles = WORDS( TheFiles )
  35. FileCounter   = 1
  36.  
  37. DO WHILE (FileCounter <= NumberOfFiles)
  38.     IF (FileCounter > OrdinalMax) THEN
  39.         String = "Another file you picked is:" || NL
  40.     ELSE
  41.         String = "The" WORD( OrdinalWords, FileCounter ) "file you picked is:" || NL
  42.     String = String || WORD( TheFiles, FileCounter )
  43.     OKAY1 String
  44.     FileCounter = FileCounter + 1
  45. END
  46.  
  47. EXIT 0
  48.