ScanTek Manual CONTENTSPREVNEXTHOME


 ARexx Sample Script

 /*
  * $VER: ScanTek.strx 1.0 (16.04.97) Waldemar Zöhner
  *
  * Requirements: ScanTek V3.0 or higher
  *
  * Description:  This is a sample ARexx script that shows some of the
  *               ScanTek ARexx commands.
  *
  * Uses:         RC contains the Errorlevel of each ScanTek command
  *               SCANTEK.LASTERROR contains the related error string
  *               RESULT contains the result of some ScanTek command
  *
  */
 
 OPTIONS FAILAT 100
 
 OPTIONS RESULTS
 
 /* This is the primary ScanTek ARexx port */
 ADDRESS SCANTEK1
 
 
 /* Scan the preview picture and display it in the Preview Window */
 /* Template: PREVIEW                                             */
 PREVIEW
 
 /* Save the current ScanTek configuration                          */
 /* In this example it is used because it chages almost everything */
 /* Template SAVECONFIG Config_filename                            */
 SAVECONFIG "T:ST_Sample.cfg"
 
 
 /* Set Color Options                                                             */
 /* Template: COLOROPT Exptime Contrast Brightness Speed Shadow Midtone Highlight */
 COLOROPT   0 0 0 7 0 128 255
 
 
 /* Set Black/White Options                             */
 /* Not needed for a color scan, but this is an example */
 /* Template: BWOPT BW_threshold Speed                  */
 BWOPT 128 7
 
 
 /* Set Half Tone Pattern Options                       */
 /* Not needed for a color scan, but this is an example */
 /* Template: HTOPT Halftone_pattern Speed              */
 HTOPT 2 7
 
 
 /* Set Frame Size                                                          */
 /* Template : FRAMESIZE Orig_unit X-origin Y-origin Dim_unit Width Height  */
 FRAMESIZE  INCH 0.5 1.0 PIXEL 600 400 KEEP_SIZE
 /* This command sets the scanning frame to the starting point (0.5|1.0)    */
 /* inch and the width and height (600|400) Pixel                           */
 /* KEEP_SIZE is usefull if you want preserve the dimension of the scanning */
 /* frame. Regardless what resolution you choose ScanTek tries to keep the  */
 /* size constant.                                                          */
 
 
 /* Set the global parameters for the next scan                                 */
 /* Template : SCANOPT Scan_mode Resolution Use_LuT Use_ext_prog Image_filename */
 SCANOPT color 100 no_lut use_ext_prog "Work:ST_Sample.iff"
 
 
 /* Start the scan of an image with the current settings */
 /* This is the most important ScanTek ARexx command    */
 /* Template : SCAN                                     */
 SCAN
 
 
 /* Get the (Device:Path/Name) of the last scanned image */
 /* Template : GETIMAGENAME                              */
 GETIMAGENAME
 /* The filename is returned in the variable RESULT      */
 IF RC > 0
  THEN SAY SCANTEK.LASTERROR
  ELSE SAY 'GETIMAGENAME Result is 'RESULT
 
 
 /* Load a saved ScanTek configuration                          */
 /* In this example it is used to udo all operations above here */
 /* Template LOADCONFIG Config_filename                         */
 LOADCONFIG "T:ST_Sample.cfg"
 
 
 EXIT

TOP Do you have any suggestions or questions about ScanTek then email to scantek@gmx.de CONTENTSPREVNEXTHOME

Copyright 1996/97/98/2002 by Waldemar Zöhner V1.1