home *** CD-ROM | disk | FTP | other *** search
- /*
- * CPK ARexx communications test...
- *
- * Author: Eric G. Suchanek, Ph.D.
- * Copyright ©1993 Eric G. Suchanek, Ph.D. All Rights Reserved
- *
- * You need to run the CPK program first...
- */
-
- Options FailAt 100
-
- Options Results
-
- address cpk1
- /*
- * Try to read the window title bar
- */
-
- /*
- NOTE: The Port command actually sets the errorlevel to 5,
- so you have to check for an 'error' to get the port name...
- */
-
- 'Port'
-
- if rc > 0 then say 'Port is: 'CPK.LASTERROR
- else say 'Port is: 'Result
-
- /*
- * bogus command
- */
-
- 'Junk'
-
- if rc > 0 then say 'Error was (this should be an UNKNOWN COMMAND error) 'CPK.LASTERROR
- else say 'The command worked!'
-
-
- /*
- "Load Prefs prefs/b-dna.prefs"
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The command worked!'
- */
-
-
- "Load PDB pdb/hello.pdb"
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The Load PDB command worked!'
-
- "XRot 45.0"
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The XRot command worked!'
-
- "YRot 35.0"
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The YRot command worked!'
-
- "ZRot 25.0"
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The ZRot command worked!'
-
- 'Render'
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The Render command worked!'
-
- 'Reset'
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The Reset command worked!'
-
- 'Render'
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The Render command worked!'
-
- 'Scale 3'
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The Scale command worked!'
- 'Render'
-
- /* valid range is 1 -> 20 */
-
- 'Scale 21'
- if rc > 0 then say 'Error was (should be an Argument Error) 'CPK.LASTERROR
- else say 'The Scale command worked!'
-
- 'Save IFF ram:test.iff'
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The Save IFF command worked!'
-
- 'Save PREFS ram:test.prefs'
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The Save Prefs command worked!'
-
- /*
- * Quit the program...
- */
-
- /*
- 'Quit'
- if rc > 0 then say 'Error was 'CPK.LASTERROR
- else say 'The Quit command worked!'
- */