/* v1.25 AddSpace Marko Seppänen marko.seppanen@wwnet.fi */ address IMAGEENGINEER Options results signal on error /* Setup a place for errors to go */ if arg()=0 then exit x=arg(1) pic=subword(x,1,1) value=subword(x,2,1) bg=subword(x,3,1) if bg=BLACK then bg=0 if bg=WHITE then bg=1 MARK pic PRIMARY PROJECT_INFO pic WIDTH width=result PROJECT_INFO pic HEIGHT height=result if bg="" then do 'REQUEST "Does it matter?" "White|Black"' bg=result 'GET_NUMBER "How much would like to have?" 1 100 "Ok|Cancel" 10 SLIDER' value=result if RC=5 then exit end if bg == 1 then do if exists("ie:alpha/purewhite.alpha") == "1" then do OPEN "ie:alpha/purewhite.alpha" COLOUR colortexture=result RESIZE colortexture width+(value*2) height+(value*2) TILE colortexture2=result MARK colortexture2 SECONDARY CLOSE colortexture COMPOSITE value value MIN pic2=result end else do 'REQUEST "Please copy purewhite.alpha to dir IE:Alpha/" "Ups, sorry!"' exit end end else do if exists("ie:alpha/pureblack.alpha") == "1" then do OPEN "ie:alpha/pureblack.alpha" COLOUR colortexture=result RESIZE colortexture width+(value*2) height+(value*2) TILE colortexture2=result MARK colortexture2 SECONDARY CLOSE colortexture COMPOSITE value value MAX pic2=result end else do 'REQUEST "Please copy pureblack.alpha to dir IE:Alpha/" "Ups, sorry!"' exit end end CLOSE colortexture2 exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end