home *** CD-ROM | disk | FTP | other *** search
Wrap
/* v1.00 Open Picture (for Image Engineer) Marko Seppänen marko.seppanen@wwnet.fi */ if arg()=0 then exit /* DO WE HAVE IMAGE ENGINEER AVAILABLE?" */ if ~show('P',IMAGEENGINEER) then do if exists('IE:IE') then do address command 'Run >NIL: IE:IE' do 30 while ~SHOW('P',IMAGEENGINEER) address command 'wait >nil: 1' end if ~show('P',IMAGEENGINEER) then do say "Could not open Image Engineer's Arexx-port for some reason." say "Exiting.." end end else do say "But where's the Image Engineer?!" say "Exiting.." exit end end address IMAGEENGINEER Options results signal on error x=arg(1) parse var x pic pic=strip(pic,'B','"') OPEN "'"pic"'" COLOUR 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