ARexx/JAH Remote Control of ScapeMaker2.0 Remember - ScapeMaker's Public Message Port has the name: SCAPEMAKER. All commands are in the form of: KEYWORD or KEYWORD ARGUMENT The single keywords allowed are: SAVE GRAB QUIT All the other keywords MUST be followed by 1 space (ASCII HEX $20, ' ') character, then the 'argument' of the keyword command. Here are the 'English-like' ARexx and JAH command keywords: PICPATH string (set picture file path, e.g. PICPATH "DF0:") PICNAME string (picture filename, e.g. PICNAME MYPICTURE) DEMPATH string (set DEM path name, also in quotes, e.g. DEMPATH "RAM:") DEMNAME string (set DEM filename, e.g. DEMNAME SCAPE) OPEN PIC (opens the named picture file) OPEN DEM (opens the named DEM file - for Double Exposing stuff) MODE VALUE (set modes) MODE NUMBER MODE EXTRUDE MODE CARVE DOUBLE ON (double expose) DOUBLE OFF INSET ON (inset mode) INSET OFF SMX ON (smoothing in X direction) SMX OFF SMY ON (smoothing in Y direction) SMY OFF SCALE 1-99 (e.g. SCALE 20) MESA 0-99 (e.g. MESA 10 means Mesa Height of 1000) SMOOTH 1 (smooth scape by 2) SMOOTH 2 ( 4) SMOOTH 3 ( 8) SMOOTH 4 ( 16) SMOOTH 5 ( 32) WIDTH value (width of grabber window) HEIGHT value (height of grabber window) LEFTEDGE value (distance of grabber window from left of image) TOPEDGE value (distance of grabber window from top of image) GRAB (grab the scape!) SAVE (save the scape as named by DEMPATH and DEMNAME) QUIT (quit from the ScapeMaker program) You'll find a REXXSCRIPT example of these commands and their formats. These commands also work with JAH (see JahScript for an example). ARexx Limit Checking, Error Checking, and Error Reporting All ARexx/Jah commands are limited to 64 characters in length. If you need to use long file names or paths, use ASSIGN commands before you start ScapeMaker. Remember, file paths longer than 79 characters are not allowed and file names longer than 30 characters are not allowed at all by ScapeMaker. The keywords are only checked to see if the first four letters match the templates above. For example, you can use PICP instead of PICPATH. Likewise, you can use PICPATHXXXXX instead of PICPATH if you really want to. Keywords which should be followed by an argument are checked to see if there is EXACTLY ONE SPACE CHARACTER and then AT ONE ADDITIONAL CHARACTER. Also, there are specific limit checks and error checks on almost all the keywords which have arguments: 1. If the argument is a choice of ON or OFF, only those two exact choices will work (except you can make them longer, e.g. OFFXXXXX, if you really want to) 2. WIDTH and HEIGHT are limited to a range of 10 to 258 There is no check now to see if the HEIGHT value is greater than the picture's height. For example, you might load in a regular lo-res picture (320x200) and still set HEIGHT to 258. When you try to do the GRAB, however, you should get an error since ScapeMaker can't open a 258 high window on a 200 high screen! Besides - doesn't everyone use interlace ALL the time?? 3. LEFTEDGE and TOPEDGE will report an error if: LEFTEDGE + WIDTH > width of picture TOPEDGE + HEIGHT > height of picture YOU SHOULD LOAD AN IMAGE INTO ScapeMaker BEFORE YOU TRY TO SET LEFTEDGE OR TOPEDGE!! 4. SCALE is limited to a range of 1 to 99. 5. MESA is limited to a range of 0 to 99. 6. SMOOTH is limited to a range of 1 to 5. 7. MODE argument is checked so its first 4 characters match the possible modes: VALU... (for VALUE) NUMB... (for NUMBER) EXTR... (for EXTRUDE) CARV... (for CARVE) The ... means you can have anything following the checked choices, e.g. you can use VALUZRASG#@ if you want. 8. All numerical arguments are limited to ASCII numerals 0-9 and can be a maximum of 3 digits long. 9. OPEN checks to see if the first 3 letters of its argument are indeed either PIC or DEM. You could use OPEN PICSXsd if you wanted to. By convention (see the ARexx Manual by William Hawes), ScapeMaker returns a value to ARexx after every command. ARexx conventions are: 0 means no error 5 means tolerable error 10 means intolerable serious error ScapeMaker only returns two possible values to ARexx, 0 or 10. If an ARexx command to ScapeMaker succeeds, then ScapeMaker returns 0. If a command fails, then ScapeMaker always returns 10, since none of the errors you can get in ScapeMaker is really tolerable. Any ScapeMaker error means something really went wrong (e.g. you tried to smooth a scape before you even loaded a pic) and your ARexx script-program definitely is going to give you WRONG results. Another important aspect of ScapeMaker is that the menu checkmarks do not change when you operate the program by remote control (either Jah or ARexx). DO NOT EXPECT the menu checkmarks to reflect reality after you run an ARexx script on ScapeMaker. You are probably wisest to simply use the ARexx stuff strictly for batch file handling and not attempt to switch back and forth between manual and remote-control operation of ScapeMaker. JAH is a CLI command I wrote a while back which lets you send a text message to a named message port, without using ARexx at all. If you don't have ARexx, you can use JAH (either as a CLI command or within an AmigaDos script) to control ScapeMaker. The JAH commands are just like the ARexx commands described above and there is a sample JAH script on this disk. You can also try the XecuteJAHScript. Just double-click on the icon and a JAH script (an AmigaDos script) will fire up ScapeMaker and run it by remote control. JAH doesn't have any error reporting at all. JAH is on this disk. It is copyrighted, so don't copy it and give it away. Thanks. Have fun with ScapeMaker remote control, both ARexx (if you have it) and JAH. Daniel Wolf MegageM 1903 Adria Santa Maria, CA 93454 Phone: 805-349-1104 Compuserve: 70250,626