home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Graphics / PPT / rexx / RevealEmbedFile.prx < prev    next >
Text File  |  1999-11-28  |  1KB  |  58 lines

  1. /*
  2.     This is a simple script that shows you how easy it is to find the
  3.     hidden message from EmbedFile if you keep the original file around.
  4.  
  5.     $Id: RevealEmbedFile.prx,v 1.1 1999/11/28 18:13:29 jj Exp jj $
  6. */
  7.  
  8. /*-------------------------------------------------------------------*/
  9. /*  I suggest you use this header as-is and add your own code below  */
  10.  
  11. OPTIONS RESULTS
  12. SIGNAL ON ERROR
  13. IF ADDRESS() = REXX THEN DO
  14.     startedfromcli = 1
  15.     ADDRESS PPT
  16. END
  17. ELSE DO
  18.     startedfromcli = 0
  19.     ADDRESS PPT
  20. END
  21. RESULT = 'no result'
  22.  
  23. /*-------------------------------------------------------------------*/
  24. /* Add your code here */
  25.  
  26. PARSE arg encodedframe
  27.  
  28. IF DATATYPE(encodedframe) ~= NUM THEN DO
  29.     RC = 10
  30.     RC2 = "No frame selected"
  31.     SIGNAL ERROR
  32. END
  33.  
  34. ASKFILE '"Please select original cover file"' POS "Open"
  35. filename = RESULT
  36.  
  37. LOADFRAME filename
  38. origframe = RESULT
  39.  
  40. PROCESS encodedframe Composite WITH origframe METHOD Subtract
  41. PROCESS encodedframe Bitfield 0 0
  42.  
  43. EXIT 0
  44.  
  45. /*-------------------------------------------------------------------*/
  46. /* Again, keep this part intact. This is the error handler. */
  47. ERROR :
  48. returncode = RC
  49. IF startedfromcli = 1 THEN DO
  50.     SAY 'ERROR ' returncode ' on line ' SIGL ': ' RC2
  51.     PPT_TO_BACK
  52. END
  53. ELSE
  54.     SHOWERROR '"'RC2'"' SIGL
  55. EXIT returncode
  56.  
  57.  
  58.