/* $VER: ScanImage.rexx 1.2 for ImageStudio V2.x.x © by Jochen Grus (03.09.96) */ OPTIONS RESULTS SQ = "'" options failat 25 /* ScanToDisk returns 0 or 20 */ REQUEST_MESSAGE TEXT '"ScanImage V1.2 © 1996 by Jochen Grus!\n\n'||, 'It was really hard to write this script!\n'||, 'It needed 1 Minute of my lifetime (Kicher)\n'||, 'So have fun with it and remember this one minute..."', BUTTONTEXT "OK" ram:ScanImage ok=1 call SCAN() /* Scans the image into a temporary file */ call IMPORTGRAPHIC() /* Loads Image into ImageStudio */ call DELETEFILE() /* Removes temporary image file */ EXIT SCAN: /* Scans the image into a temporary file using the program "ScanToDisk". */ if not 1=open('path','ENV:ScanQuix/Path','READ') then do ok=0 return end pragma('DIRECTORY',READLN('path')) address command 'ScanQuix3/ScanToDisk FILE=ram:ScanImage TRUECOLOR NOICONS NOGUI PUBSCREEN=IMAGESTUDIO' if RC>=5 then do ok=0 return end return IMPORTGRAPHIC: /* Loads the image into ImageStudio */ if ok=0 then return 'open ram:ScanImage' return DELETEFILE: /* removes temporary file */ address command 'delete ram:ScanImage' return