home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / UE311CMD.ZIP / ENCODE.CMD < prev    next >
OS/2 REXX Batch file  |  1990-06-19  |  768b  |  36 lines

  1. ;    ENCODE:    Captain Midnight strikes again!!!!!
  2. ;        This will do a simple substitution cypher
  3.  
  4. set %set1 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
  5. set %set2 "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"
  6.  
  7. 30    store-macro
  8.     beginning-of-file
  9. *nxt1
  10.     set $line &xlate $line %set1 %set2
  11.     !force next-line
  12.     !if &seq $status "TRUE"
  13.         !goto nxt1
  14.     !endif
  15.     beginning-of-file
  16.     write-message "[Buffer ENCODED]"
  17. !endm
  18.  
  19. 31    store-macro
  20.     beginning-of-file
  21. *nxt2
  22.     set $line &xlate $line %set2 %set1
  23.     !force next-line
  24.     !if &seq $status "TRUE"
  25.         !goto nxt2
  26.     !endif
  27.     beginning-of-file
  28.     write-message "[Buffer DECODED]"
  29. !endm
  30.  
  31. bind-to-key execute-macro-30 FN1
  32. bind-to-key execute-macro-31 FN2
  33.  
  34. write-message "[All set for good stuff!]"
  35.  
  36.