home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / os30 / gfx / cpk / test.cpk < prev   
Encoding:
Text File  |  1993-12-21  |  2.0 KB  |  101 lines

  1. /*
  2.  * CPK ARexx communications test...
  3.  *
  4.  * Author: Eric G. Suchanek, Ph.D.
  5.  * Copyright ©1993 Eric G. Suchanek, Ph.D. All Rights Reserved
  6.  *
  7.  * You need to run the CPK program first...
  8.  */
  9.  
  10. Options FailAt 100
  11.  
  12. Options Results
  13.  
  14. address cpk1
  15. /*
  16.  * Try to read the window title bar
  17.  */
  18.  
  19. /* 
  20.    NOTE: The Port command actually sets the errorlevel to 5,
  21.    so you have to check for an 'error' to get the port name... 
  22. */
  23.  
  24. 'Port'
  25.  
  26. if rc > 0 then say 'Port is: 'CPK.LASTERROR
  27. else say 'Port is: 'Result
  28.  
  29. /*
  30.  * bogus command
  31.  */
  32.  
  33. 'Junk'
  34.  
  35. if rc > 0 then say 'Error was (this should be an UNKNOWN COMMAND error) 'CPK.LASTERROR
  36. else say 'The command worked!'
  37.  
  38.  
  39. /*
  40. "Load Prefs prefs/b-dna.prefs"
  41. if rc > 0 then say 'Error was 'CPK.LASTERROR
  42. else say 'The command worked!'
  43. */
  44.  
  45.  
  46. "Load PDB pdb/hello.pdb"
  47. if rc > 0 then say 'Error was 'CPK.LASTERROR
  48. else say 'The Load PDB command worked!'
  49.  
  50. "XRot 45.0"
  51. if rc > 0 then say 'Error was 'CPK.LASTERROR
  52. else say 'The XRot command worked!'
  53.  
  54. "YRot 35.0"
  55. if rc > 0 then say 'Error was 'CPK.LASTERROR
  56. else say 'The YRot command worked!'
  57.  
  58. "ZRot 25.0"
  59. if rc > 0 then say 'Error was 'CPK.LASTERROR
  60. else say 'The ZRot command worked!'
  61.  
  62. 'Render'
  63. if rc > 0 then say 'Error was 'CPK.LASTERROR
  64. else say 'The Render command worked!'
  65.  
  66. 'Reset'
  67. if rc > 0 then say 'Error was 'CPK.LASTERROR
  68. else say 'The Reset command worked!'
  69.  
  70. 'Render'
  71. if rc > 0 then say 'Error was 'CPK.LASTERROR
  72. else say 'The Render command worked!'
  73.  
  74. 'Scale 3'
  75. if rc > 0 then say 'Error was 'CPK.LASTERROR
  76. else say 'The Scale command worked!'
  77. 'Render'
  78.  
  79. /* valid range is 1 -> 20 */
  80.  
  81. 'Scale 21'
  82. if rc > 0 then say 'Error was (should be an Argument Error) 'CPK.LASTERROR
  83. else say 'The Scale command worked!'
  84.  
  85. 'Save IFF ram:test.iff'
  86. if rc > 0 then say 'Error was 'CPK.LASTERROR
  87. else say 'The Save IFF command worked!'
  88.  
  89. 'Save PREFS ram:test.prefs'
  90. if rc > 0 then say 'Error was 'CPK.LASTERROR
  91. else say 'The Save Prefs command worked!'
  92.  
  93. /*
  94.  * Quit the program...
  95.  */
  96.  
  97. /*
  98. 'Quit'
  99. if rc > 0 then say 'Error was 'CPK.LASTERROR
  100. else say 'The Quit command worked!'
  101. */