home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / ADPro251-3.DMS / ADPro251-3.adf / ADProScripts.lha / .GetModeID.ADPro next >
Encoding:
Text File  |  1994-01-31  |  1.5 KB  |  65 lines

  1. /*
  2. ** GetModeID.adpro
  3. **
  4. ** $VER: GetModeID.adpro 1.0.0 (11.01.94)
  5. **
  6. ** This REXX program is used to get the ModeID of a particular screen mode.
  7. ** This is particularly useful when used with the ADPro Get & Set screen mode
  8. ** rexx commands which require a screen mode ID. This will also get mode IDs
  9. ** for third party graphics cards supported through ADPro's render libraries.
  10. **
  11. ** This the screen mode requestor will only show currently available screen modes.
  12. **
  13. ** This script requires ADPro v2.5.0 (or higher).
  14. **
  15. ** Copyright © 1990-1993 ASDG, Incorporated
  16. ** All Rights Reserved
  17. */
  18.  
  19. ADDRESS "ADPro"
  20. OPTIONS RESULTS
  21.  
  22. NL = '0A'X
  23. SQ = '27'X
  24. DQ = '22'X
  25. TRUE  = 1
  26. FALSE = 0
  27.  
  28. /*
  29. ** Get a screen mode requestor
  30. */
  31.  
  32. continue = TRUE
  33. DO WHILE (continue = TRUE)
  34.  
  35. ADPRO_TO_FRONT
  36.  
  37. GET_SCREEN_MODE '"Select a screen mode"' Amiga "XXX" 320 200 4
  38. ScreenMode = ADPRO_RESULT
  39. IF (RC ~= 0) THEN DO
  40.     ADPRO_TO_FRONT
  41.     OKAY1 "Could not get screen modes."
  42.     EXIT 10
  43. END
  44.  
  45. PARSE VAR ScreenMode RenderLib ModeID Width Height Depth
  46.  
  47. text = "Selected screen mode information:" || NL || NL||, 
  48.        "Render Library = " || RenderLib || NL ||,
  49.        "Mode ID = " || ModeID || NL ||,
  50.        "Width = " || Width || NL ||,    
  51.        "Height = " || Height || NL ||,
  52.        "Depth = " || Depth || NL || NL ||,
  53.        "Check another screen mode ?"
  54.  
  55. OKAYN '"GetScreenModeID.adpro"' '"'text'"' '"Yes|No"'
  56. IF (RC = 0) THEN DO
  57.     ADPRO_TO_FRONT
  58.     OKAY1 "Exiting..."
  59.     EXIT 0
  60. END
  61.  
  62. ELSE IF (RC = 1) THEN
  63.     continue = TRUE
  64.  
  65. END