home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / TextEditors&Viewers / Ced / CYGNUSED3,5.DMS / in.adf / CEDScripts / CutToUnit.ced < prev    next >
Encoding:
Text File  |  1993-07-07  |  870 b   |  54 lines

  1. /*
  2. ** CutToUnit.ced
  3. **
  4. ** $VER: CutToUnit.ced 1.0.0 (24.05.93)
  5. **
  6. ** This script allows you to cut the currently defined block to a specific
  7. ** Clipboard unit.
  8. **
  9. ** This script requires CygnusEd Professional v3.5 (or later) to run.
  10. **
  11. ** Copyright © 1993 ASDG, Incorporated  All Rights Reserved
  12. */
  13.  
  14.  
  15. OPTIONS RESULTS
  16.  
  17.  
  18. NL = '0A'X
  19. TRUE = 1
  20. FALSE = 0
  21. MinClipUnit = 0
  22. MaxClipUnit = 255
  23.  
  24. STATUS BLOCKY
  25. IF (RESULT = -1) THEN DO
  26.     CEDTOFRONT
  27.     OKAY1 "No block currently defined."
  28.     EXIT 0
  29. END
  30.  
  31. STATUS CLIPUNIT
  32. OldClipUnit = RESULT
  33. NewClipUnit = OldClipUnit
  34.  
  35. CEDTOFRONT
  36. GETNUMBER NewClipUnit '"Cut to which unit?"' MinClipUnit MaxClipUnit
  37. IF (RESULT = "") THEN
  38.     EXIT 0
  39. ELSE DO
  40.     NewClipUnit = RESULT
  41. END
  42.  
  43. SET CLIPBOARD UNIT NewClipUnit
  44.  
  45. CUT
  46. IF (RESULT = 0) THEN DO
  47.     CEDTOFRONT
  48.     OKAY1 "Error cutting to clipboard unit" NewClipUnit || "."
  49. END
  50.  
  51. SET CLIPBOARD UNIT OldClipUnit
  52.  
  53. EXIT 0
  54.