home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Workbench / Pilotes / Scanners / ScanTek3_10.lha / ScanTek / Rexx / ScanTek.strx next >
Text File  |  1997-04-18  |  3KB  |  87 lines

  1. /*
  2.  * $VER: ScanTek.strx 1.0 (16.04.97) Waldemar Z÷hner
  3.  *
  4.  * Requirements: ScanTek V3.0 or higher
  5.  *
  6.  * Description:  This is a sample ARexx script that shows some of the
  7.  *               ScanTek ARexx commands.
  8.  *
  9.  * Uses:         RC contains the Errorlevel of each ScanTek command
  10.  *               SCANTEK.LASTERROR contains the related error string
  11.  *               RESULT contains the result of some ScanTek command
  12.  *
  13.  */
  14.  
  15. OPTIONS FAILAT 100
  16.  
  17. OPTIONS RESULTS
  18.  
  19. /* This is the primary ScanTek ARexx port */
  20. ADDRESS SCANTEK1
  21.  
  22.  
  23. /* Scan the preview picture and display it in the Preview Window */
  24. /* Template: PREVIEW                                             */
  25. PREVIEW
  26.  
  27. /* Save the actual ScanTek configuration                          */
  28. /* In this example it is used because it chages almost everything */
  29. /* Template SAVECONFIG Config_filename                            */
  30. SAVECONFIG "T:ST_Sample.cfg"
  31.  
  32.  
  33. /* Set Color Options                                                             */
  34. /* Template: COLOROPT Exptime Contrast Brightness Speed Shadow Midtone Highlight */
  35. COLOROPT   0 0 0 7 0 128 255
  36.  
  37.  
  38. /* Set Black/White Options                             */
  39. /* Not needed for a color scan, but this is an example */
  40. /* Template: BWOPT BW_threshold Speed                  */
  41. BWOPT 128 7
  42.  
  43.  
  44. /* Set Half Tone Pattern Options                       */
  45. /* Not needed for a color scan, but this is an example */
  46. /* Template: HTOPT Halftone_pattern Speed              */
  47. HTOPT 2 7
  48.  
  49.  
  50. /* Set Frame Size                                                          */
  51. /* Template : FRAMESIZE Orig_unit X-origin Y-origin Dim_unit Width Height  */
  52. FRAMESIZE  INCH 0.5 1.0 PIXEL 600 400 KEEP_SIZE
  53. /* This command sets the scanning frame to the starting point (0.5|1.0)    */
  54. /* inch and the width and height (600|400) Pixel                           */
  55. /* KEEP_SIZE is usefull if you want preserve the dimension of the scanning */
  56. /* frame. Regardless what resolution you choose ScanTek tries to keep the  */
  57. /* size constant.                                                          */
  58.  
  59.  
  60. /* Set the global parameters for the next scan                                 */
  61. /* Template : SCANOPT Scan_mode Resolution Use_LuT Use_ext_prog Image_filename */
  62. SCANOPT color 100 no_lut use_ext_prog "Work:ST_Sample.iff"
  63.  
  64.  
  65. /* Start the scan of an image with the actual settings */
  66. /* This is the most important ScanTek ARexx command    */
  67. /* Template : SCAN                                     */
  68. SCAN
  69.  
  70.  
  71. /* Get the (Device:Path/Name) of the last scanned image */
  72. /* Template : GETIMAGENAME                              */
  73. GETIMAGENAME
  74. /* The filename is returned in the variable RESULT      */
  75. IF RC > 0
  76.  THEN SAY SCANTEK.LASTERROR
  77.  ELSE SAY 'GETIMAGENAME Result is 'RESULT
  78.  
  79.  
  80. /* Load a saved ScanTek configuration                          */
  81. /* In this example it is used to udo all operations above here */
  82. /* Template LOADCONFIG Config_filename                         */
  83. LOADCONFIG "T:ST_Sample.cfg"
  84.  
  85.  
  86. EXIT
  87.